|
I want to call log-off function onclick of browser close button. Please give me sample code
|
|
|
|
|
i created an app. but when i clicked the back button in the browser, it shows an err-msg.But it shud not happen, plz help.
|
|
|
|
|
What is the browser you are using and what is the error message you are getting?
N.Surendra Prasad
|
|
|
|
|
Hi,
I have problem with my web site, when user sign in i use the session to store username and password, but it early to expire. Sometimes 1 or 2 mns.
I have put Session in web.config already
<sessionstate mode="InProc" stateconnectionstring="tcpip=127.0.0.1:42424" sqlconnectionstring="data source=127.0.0.1;trusted_connection=true" cookieless="false" timeout="6000">
Please help me
Socheat
|
|
|
|
|
If your session is set to the default of 20 minutes then there must be some other cause.
If your session is stored as "InProc" (In Process) then it can be damaged by a number of things. The App Pool being recycled (becuase it is now in a different process). IIS being reset. You have a web garden or web farm. Anything that means that the new web request is handled somehow by a different process to the previous request.
However, if you are doing this in Visual Studio and stopping and starting debugging then this is only natural and to be expected.
|
|
|
|
|
Yes, I used "InProc" in web.config
I developed in Visual Studio in my local, it work normally, but when upload it to the server it work not good because the session always expire. So anyway that can do?
Socheat
|
|
|
|
|
Socheat.Net wrote: So anyway that can do?
Just check ASP.NET process is recycling frequently? I believe it gives some entries to EventViewer when it restarts. If it is recyling frequently, you need to find why it is doing so and solve it.
|
|
|
|
|
N a v a n e e t h wrote: I believe it gives some entries to EventViewer when it restarts
I'm not sure that it does. At least not by default.
I've got a web application that recycles far too often for my liking and I only see a message that I put up when the Appliation_Start method runs to say that it has processed a certain config setting that I created.
|
|
|
|
|
Colin Angus Mackay wrote: I'm not sure that it does. At least not by default.
Well, I was not sure. Anyway, solving this kind of problem is a pain.
|
|
|
|
|
N a v a n e e t h wrote: Anyway, solving this kind of problem is a pain
Absolutely.
|
|
|
|
|
Socheat.Net wrote: So anyway that can do?
You have to find out what is causing it to expire first. This means adding some additional logging to your application (I presume you already have some logging already).
To start: In your Global.asax.cs/.bv file you'll have a method that handles the Application Start event. Log when ever that is called. If you notice that it is called around the same time as you lose your session then you know that your process isn't surviving long enough.
So, if your process isn't surviving very long you need to find out why. If you don't get lots of log messages in that area then you'll need to move onto the next step and log something else.
It is a process of trial and error with potentially many iterations.
|
|
|
|
|
Thanks.
I will try my best
Socheat
|
|
|
|
|
You can do one thing. Create a separate Application Pool For Your Web Application Only. Then test the web application. Make sure you are having only one Worker process (Not a web garden).
|
|
|
|
|
My questions is that I want to expand out a multiline textbox that could have anywhere from 1 to 100 lines of data so it will all show up when I print it? I have been trying for days and have had no luck, so any help would be great.
Thanks
|
|
|
|
|
What do you mean by expanding the multiline textbox? Are you trying to print the entire contents on the screen? If yes, you need to replace newline characters with <br> and \t with   to get the text in correct format.
|
|
|
|
|
I have a form that user is filling out, drop down boxes, radial buttons, text buttons and multiline text buttons. When user enters the data in the mutiline textbox and it scrolls down. I want to print the page in the same layout as the data was entered, but with the multiline textbox expanded out so when it printed out, all the data would be displayed like it was on the page from all the fields and from the multiline textbox would so everything.
Thanks for the reply
|
|
|
|
|
Follow what I said in my previous reply. Just do the replace.
|
|
|
|
|
That will autoexpand and auto-contract the size of my textbox depending on the number of lines of text?
|
|
|
|
|
Asalamoalekum All,
i am working with ASP.NET... i have a from with textbox and a button
when user press button the text of textbox is inserted into a sql table
the insert query behind button is:
string insert = "insert into myDB.dbo.Messages (text) values('"+textbox1.text+"')";
IF MY TEXTBOX CONTAINS COMBINATION OF ANY CHARACTERS (except single quote as aspostophe) there is no problem, it works properly but IF MY TEXTBOX contains any single quote.. for Example:
textbox1 text is :- its HER'S matter dont disturb her
here it encounters an exception that unclosed single quotation...
how i could avoid this... because single quote is very common, user needs to use thisss!
(if single double quotation mark(") is used there is no problem)
please tell me the solution.
thanks,
regards,
SANA AHMAD
$@N@
|
|
|
|
|
|
Really thankssss..
ALLAH bless you !
take care
regards,
SANA
$@N@
|
|
|
|
|
sana17 wrote: how i could avoid this... because single quote is very common, user needs to use thisss!
By using parameterized queries. Read about SQL Injection attacks[^], a best article on the subject, and rewrite your query.
|
|
|
|
|
THANKSSSS ALOT.. its really good article...
i have never thought the probelm in this way... really its cool and logical!!
THANKS AGAIN!
ALLAH bless you
take care
regards,
SANA
$@N@
|
|
|
|
|
Hey,
I have to provide one of my clients a visio app, but in the form of a web app.
I havent looked around, hence starting here, but basically I dont need anything to fancy.
Im not sure if a solution exsists already? but I have a meeting tomoz and have highlighted
some pre requirements.
Now the client wants me to do all these wonderful diagrams for him, but Im 99.9% sure he would
be more happy with having the tools so they can do it in house.
So I want to provide them some basic tools to be able to produce this.
So 2 things here, 1 is to allow the user to design the diagram and the 2 it to present it to the
user users, so they will see a presentation
1. Circula Button - Text in the middle, a standard size, 3 colour types,
- This is needed as user will be able to click the button and bring up another web page that will contain data.
2. Pointing arrors - to be able to point\ link lines between the Circula Buttons.
Right,
1. Does a solution like this already exist?
2. IF 1 = False, how do I go about creating a button to use in a web app, advice, example, links?
thanking you in advance
|
|
|
|
|
hi friends. i want make a recursive method for fill all categories and subcategories to a asp.net ajax accordion.
so i need like this:
Computers
--Notebook
---AMD
----Intel
-----Intel Core Duo
-------Intel ABC PC
-------Intel XYZ PC
-----Intel Core 2 Duo
--Desktop PC
---PC1
---PC2
Mobiles
--With Camera
---Good Phone
---Bad Phone
--Without Camera
--Pocket PC
how I to do bind or fill this structure to Ajax accordion?
viva la commune
|
|
|
|