prompt before leaving page (ModalPopUp)
Hi,I want to use a ModalPopUpExtender to prompt user that there is some unsaved data on page. It should works like 'onbeforeunload' function, but I want to use my own popup for a confirmation (ModalPopUpExtender). Please provide me with some sample code. Thanks a lot.
there is some sample..
http://mattberseth.com/blog/2007/07/modalpopupextender_example_for.html
http://www.asp.net/AJAX/AjaxControlToolkit/Samples/ModalPopup/ModalPopup.aspx
i hope these help youihsany######Make It Easy--------------dont forget to click <Mark As Answer>------------------
I doubt very much th...
Detect user leaving page and prompt
I have a asp.net 2.0 master page that contains one content page. On this content page I have 3 formviews. Does anyone know how to check to see if these formviews are in edit mode if they are prompt the user before leaving the page (ie X button or back button on browser)
Thank you
Spafa9-------------Please: Don't forget to click "Mark as Answer" on the post that helped you. That way future readers will know which post solved your issue.
protected void Page_Load(object sender, EventArgs e) &nb...
Prompting a user to save data when leaving a page
I've seen articles written on this subject for v1 but nothing as yet for v2.
I use a master page and content pages with formview controls (& sqldataadapters) for data input.
I want to be able to prevent a user from moving off the page when they have unsaved data on either an insertitem or edititem template.
From reading the earlier articles I'm unclear as to whether the new features in v2.0 will still allow these ideas to work. Before going ahead and trying (and potentially wasting time) I thought I'd ask what other people are doing as I'm sure this is a common situation.
I neve...
How do you open a new page in ajax .net ModalPopup?
In classic asp I used new Ajax.Request('/default.asp', {..... But in .net I can't seem to find anything about opening a new modal popup of a new page. Thanks.
To really show another page in a modal popup you would have to use an iframe inside the popup.-- "Mark As Answer" if my reply helped you --...
Prompt User to Save changes before leaving the page
Hi,
I have several pages where I use formviews. What's the best way to promt the user to save the changes if they try to leave the page?
Thanks.
You will need to use the javascript window.onBeforeunload event. Here is a link to an article describing exactly how to do this.
http://www.4guysfromrolla.com/webtech/100604-1.shtml
Thank you,
This looks like a useful method of doing it, but the article is old. I am having trouble figuring out mainly how to do it with formviews. Since the controls are in a formview, how can you do that in javascript?
T...
System.Web.UI.Page and Ajax.net
İ use .net 2005 and ajax.net.Normally i use System.Web.UI.Page,my webpage is working.But in here we use
other page that extends System.Web.UI.Page.if i extend my class to our webpage my ajax.net isn't working.
My error explanation is:
sys.webfrom.pagerequestmanagerparserErrorException:the message received from the server could not beparsed.Common causes for this error are when the response is modifies by calls to Response.write(),response filters,httpmodules,or server trace is enabled.
Details:Error parsing near'itle||Untitled PAge|<script language=J...
how to clear the page values when using ajax and modalpopup extender and user control
iam using two user controls u1 and u2 for this usercontrols iam using another user control p1 .and iam applying ajax in the page where these usercontrols are there .the problem is when i click one button the u1 is getting fired . and it is comming like a popup because iam using ModalPopupExtender with out flickering the page.but when iam giving some values and closing the popup and agin opening then the old values in the control u1 is not clearing and at the same time since iam using a uc p1 in the u1 .now wen iam opening the u2 .using javascript im handling some function where this p1 contr...
How to ask a user whether he wants to leave a web-page during an ajax request (IE)?
Hello!
I have an ajax-enabled website.
For example, there is a button with a Response.Redirect() in the click event handler. I need to ask the user if he wants to leave a page or not after the button clicked and the Response.Redirect() starts to execute. When I try to use a javascript window.onbeforeunload with a confirm message and the user answers he wanted to leave a page, there is an unspecified error raised. How can I achive the desired functional?
You can use asp link button or html button. My example is using html button.
in .aspx file
<script type="text/javas...
Not preserving the state of the Ajax page when user gets out of page
Hi,
I have an asp.net ajax page.
When the user gets to another page, and then returns to the page, page is preserved (not reinitialized)
I want it to be reinitialized everytime user gets out of page.
I tried to play with Response.Cache, didn't work.
Any suggestions
I believe this question should have a trivial answer. But how?
Without Ajax, a similar situation was avoided using smartnavigation=false.
With Ajax, whats the answer?
Hi onura Based on my understanding, you are talking about maintain the Scroll Position when back to the page, and you need the Scr...
System.Web.UI.Page and System.Web.UI.UserControl
the below code works great for myBasePage.cs that inherits from : System.Web.UI.Page
and the same code i copied to another base class which is myBaseControl.cs that inherits from : System.Web.UI.UserControlthe below code does not work for myBaseControl.cs and after i look at the MSDN i found that i have to use
SaveViewState()LoadViewStatemy qustion is how do i make my code use the above two methods (SaveViewState & LoadViewState) ?
protected override void SavePageStateToPersistenceMedium(object viewState){string key = Request.Url.ToString() + "__VIEWSTATE";System.IO.Memo...
How to maintain page scroll position after clicking AJAX Rating control in AJAX ModalPopup
HiHow can i maintain page scroll position.I have placed a AJAX Rating Control in ModalPopup Extender, but when i click on rating control in modalpopup extender my page scroll position is changing it is moving to the top of page.I have used maintainScrollPositionOnPostBack ="true" for pages but it does not work Can any help to solve this problem.regardsprashant
Try this. "Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us."
Hi Thanks for your reply.Rating1.Attributes...
Is it possible to load a usercontrol from a class which is not inherited from System.web.ui.Page(or UserControl)
I have a class.which is inherited from System.Object. , But I want to load a usercontrol in this class. Is it possible ? and how to do it?Thanks.
I think more info is needed as to just what you are trying to do, as the basic idea of a User Control is for display purposes, and there is no display mechanism for a System.Object.NC......
I wrote code Response.Redirect then page is not redirected to reqquested page ( ajax.net)
I wrote code Response.Redirect then page is not redirected to reqquested page (with ajax.net)
make sure that your target URL is valied and correct... or the problem might be from your browserRegards...Nassar, RamiMy Blog || E-Mail Don't forget to click "Mark as Answer" on the post that helped you.This credits that member, earns you a point and marks your thread as Resolved so we will all know you have been helped.
dear,
just paste the code so that we can assist u accordinglyKind Regards,Saurabh Sharmaonly dead fish swim along the flow of river, learn to make yo...
Re: How to control the columns displayed on a .net page depending on the page the user is coming from
Hi all,
I have got two pages on wy website which contains a form to submit data into the same database. The two pages have also got a link to view the submitted data. The challenge I have got at the moment is, I want to be able to control columns the users see depending on the which of the two pages they are coming from. I know I can simply create two more separate pages but I don't want to do that. I feel I can be clever and achieve this with a conditional statement but to be honest, I don't know how to go about this.
Could you please help me on thsi? Bas...