|
Hello! I have a problem. In my web application I use Ajax components from OboutInc, Oracle DB, and FormsAuthentication with ticket. Where are some buttons that calls asynchronous CallBack and refresh of Update Panels. After clicking on these buttons 17 TIMES!!! Session dies (delete all variables stored in Session object, new SessionID and etc.) What's wrong?
SessionState settings:
<sessionstate
mode="InProc"
="" usehostingidentity="true" cookieless="UseCookies" cookiename="ASP.NET_SessionId" regenerateexpiredsessionid="true" timeout="50">
Thank you for nay help, and sorry for my bad English...
|
|
|
|
|
This is just a guess, but I am thinking that the button click is putting something into your session variable. If it is a larger enough object that is getting stored in session, it could be that the session object is running out of memory and is re-claiming the session memory. If you application is already using a lot of memory doing caching etc. I don't know how much memory you have available on your box that you are seeing the session die. Anyway, just a guess.
Ben
|
|
|
|
|
I would like to display contents of word documents in an Asp.net page using .net 1.1.
I can open the documents and write the contents to a text property of a control, I have 3 questions I was hoping some could answer or possibly give me a pointer to a possible answer regarding word and ASP.Net.
1. Some documents have tables and other formatting, is it possible to display the formatting on a web page?
2. Is there a framework control that would make displaying contents easier?
3. Finally, each time I close my Asp.net application I get a word pop up saying the Normal.dot needs to be saved. This only happens when opening word documents with ASP.Net.
Regards Paul
PJ
|
|
|
|
|
For those who are interested here is the code that opens a word document in the browser...
Dim fi As New System.IO.FileInfo(Request.QueryString("file"))
Response.ClearContent()
Response.ClearHeaders()
Response.AddHeader("Content-Disposition", "inline; filename=" + fi.FullName)
Response.AddHeader("Content-Length", fi.Length.ToString())
Response.ContentType = "application/ ms-word"
Response.WriteFile(fi.FullName)
Response.Flush()
Response.End()
PJ
|
|
|
|
|
what is the use of meta tag for caching a page in browser in asp.net
shashank sharma
GCI Technologies Asia Pvt.Ltd. Baroda
|
|
|
|
|
s_sharma wrote: what is the use of meta tag for caching a page in browser in asp.net
Meta have no connection with ASP.NET. It's HTML tag
|
|
|
|
|
I am using the following code of java script .
it shows the messagebox , with yes and no button.
now if the user click the yes button
i want to redirect the present page to some other respective page.
<script language="javascript" type="text/javascript"><br />
function confirm_delete()<br />
{<br />
if (confirm("Are you sure you want to delete the custom search?")==true)<br />
return true;<br />
else<br />
return false;<br />
}<br />
</script>
button.attribute.add("onclick","return confirm_delete();")
|
|
|
|
|
<script language="javascript" type="text/javascript">
function confirm_delete()
{
if (confirm("Are you sure you want to delete the custom search?")==true)
location.href='after_delete.aspx';
else
location.href='cancel_delete.aspx';
}
</script>
button.attribute.add("onclick","confirm_delete();")
Fred
|
|
|
|
|
Hi Fred......
location function is not working
path remain the same.when it is written to rediect on another page.
|
|
|
|
|
|
Fred......This is the code.
<script language="javascript" type="text/javascript"><br />
function confirm_delete()<br />
{<br />
if (confirm("Are you sure you want to delete the custom search?")==true)<br />
Location.href="main.html"<br />
else<br />
return false;<br />
}<br />
</script>
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If (Not Page.IsPostBack) Then
lnkbtnlogout.Attributes.Add("onclick", "return confirm_delete();")
End If
End Sub
|
|
|
|
|
You've been a little careless with your javascript:
a) it is case-sensitive (you had Location ionstead of location)
b) you had missed out the openeing and closing braces {} if the if... block
c) you hadn't terminated your lines with ;
Also, there is no need to return false if the user clicks Cancel - you could delete that part of the atatement if you don't want to redirect them anywhere.
Try this:
function confirm_delete()
{
if (confirm("Are you sure you want to delete the custom search?")==true)
{
location.href="main.html";
}else{
//return false;
}
}
|
|
|
|
|
Fred ..... I am still facing the same problem.Page is not redirecting to other page.
|
|
|
|
|
Post your code again...
I take it you are getting the confirm box appearing?
Fred
|
|
|
|
|
yes fred......message box is appearing
but page is not redirceting to another page.
function confirm_delete()
{
if (confirm("Are you sure you want to logout ?")==true)
{
location.href="login.aspx";
}
}
If (Not Page.IsPostBack) Then
lnkbtnlogout.Attributes.Add("onclick", "return confirm_delete();")
End If
|
|
|
|
|
hmm... is this button in an iframe or some such? Still, it should work... Do you have Firefox installed? Try running it under that with the Javascript console (Tools menu) opened and see if you get any error messages there.
If we still can't figure it, if you want to send me the whole page (no need for the code behind just the front end) in an email I'll have a look...
Fred
|
|
|
|
|
Fred...What's the mail id?
|
|
|
|
|
Click the Email link (next to the Reply link) at the foot of this message
|
|
|
|
|
Fred it will become too large.
I wanted to send the page
|
|
|
|
|
I can't email you becasue you haven't, apparently, confirmed your email address with CP... if you just send me a blank email I can then reply to that and then you will be able to email me directly....
!
Fred
|
|
|
|
|
can i use the pege.registerstartupscript function?
|
|
|
|
|
I have it now:
You need to "return false" from the js function to stop the linkbutton posting back the page. Presumably, even if they press Cancel you don't want to to do anything, so you can a;lways return false.
In fact, if you aren't going to do any server-side processing of this utton, you could just make it an ordinary HTML button and avoid this, but anyway: try this:
lnkbtnlogout.Attributes.Add("onclick", "return confirm_delete()")
function confirm_delete()
{
if (confirm("Are you sure you want to exit ?")==true)
{
location.href="../login.aspx";
}
return false;
}
</script>
Fred
|
|
|
|
|
Hi Fred .....
How can i use page.registerstartupstcript to do all these things in code behind file.
|
|
|
|
|
One Post is Enough.
Regards,
Satips.
|
|
|
|
|
Plz change your code here
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load<br />
<br />
lnkbtnlogout.Attributes.Add("onclick", "return confirm_delete();")<br />
instead of
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load<br />
If (Not Page.IsPostBack) Then<br />
lnkbtnlogout.Attributes.Add("onclick", "return confirm_delete();")<br />
End If
Coz when u click on button then javascript function will not fire.
GOD HELP THOSE WHO HELP THEMSELVES
|
|
|
|