if users press the browser's back button to reach the prior page..then page should display a message like "web page expired" in asp.net can i use javascript for this?
for example..
there are 4 pages in web sites. 1,2 and 3 can be back. but when the 4th page run then 4th page can not be back... when the user press browser's back button , diaplay ma message "weg page expired".
I have a button whose sole purpose is to set div.visible = true
There is a calendar control on my page and I need the selected date to remain selected after I hit this button. Right now if I hit the button it refreshes the whole page and sets the calendar's selected day back to date.
I was trying to disable button after it is clicked once. But I am not sure where I was going wrong. On click of Ok, I am trying to navigate back from ascx to aspx page.
I have multiple update panels with various asp buttons on a single page. I want to disable the buttons which caused the postback in update panel untill it completes.
Is there a way to avoid using a third party control for this? through JQuery or any other method ?
I am creating a button dynamically in my code and attaching a click event to it. However I have to prevent people to click it while there is a process going on. So when it is clicked once, it should be disabled and when the process ends it should be enabled. How can I do that?
This control is used multiple times on one aspx page. The issue is that each time an instance of the control is validated due to a text change any prior error messages are cleared from the validation summary. I want the validation summary to maintain prior error messages during the postback.
am creating a web application in using c# with asp.net.
in that am using login page only as normal aspx page. other pages are using masterpage.
when i click logout button in masterpage. page will redirect to login page. after that if i click browser back button it was moving to previous page. how can i prevent this.
am using this following code in master page aspx page. And My log out button code is below.
i have made a BaseUserControl.ascx and a ChildUserControl.ascxfile. both have its own code behind file.So what i want, i wanted to inharit ChildUserControl.ascx fileto BaseUserControl.ascx. so whatever in my BaseUserControl.ascx fileshould be visible into the ChildUserControl.ascx,means if i have kept a TextBox in BaseUserControl.ascx should be visibleinto the ChildUserControl.ascx desing view. and it should be accessible into the ChildUserControl.ascx code behind file.
1) Is this possible, if yes then how?
2) if above is possible then How to access BaseUserControl.ascx code behind file into the ChildUserControl.ascx code behind file?
doesn“t work for me because the button does not postback. Is there an easy way to prevent a second click while still keeping the functionality of the button?
I have the following scenario and I'm not sure how to go about in resolving it. Any ideas would gratefully recieved.I have a page(A) with a button that when selected opens a new page(B) with a populated gridView.However if the gridview hasn't got any data to display, rather than use the <EmptyDataTemplate> within the gridview, I'd rather use disable/lock the button on page(A) thus preventing access to page(B)Is this possible? How on earth would I go about such a task ?
I have read that you can not disable the back button on page load but I can clear the cashe on page load so the back button would then be greyed out. I have read a few articles on this and I am unable to get it working. I am using MS visual web developer 2010.
I have a webform where I have validators and submit buttons.WhatI am looking for one of my button is1. When its clicked, if all the validators are satisfied, 2. If all the validators are ok, It should disable the button for postback so that user cannot click it again during its process ( means during postback )3. it should enable back after postback if possible otherwise I can do it from code behind at the end of my process,
I have a usercontrol having a textbox in it. In postback(like a Search in ASPX) I want to populate the textbox with the search result. But I am finding it difficult to replace the existing value in the textbox with the new value.What is the approach should I take to resolve the issue.
I built a simple application that is used to manage photos for an image gallery on my employer's website. A user can add, edit, or delete items which are stored in an XML file. I've set up Up/Down buttons so that I can move pictures up and down in the order.On the first page, I've disabled the Up button of the first item on the RowDataBound event... since it's already first
[Code]....
I'm trying to do the same for the Down button on the last item of the last
I have Link Button to Export to excel in Master page. SinceĀ I have placed it in master page I can see Export link button in every page. I need to disable link button where gridview is not present in a page.
IĀ thing using Enabled property we can do. How to proceed. Is there any other way to do it.
<asp:LinkButton ID="LinkButtonExport" Text="Export to Excel" runat="server" OnClick="LinkButtonExport_Click" />
I have a website that uses basic ASP.Net forms authentication. In the web.config file we specify specific access rules for individual pages and directories. Everything works great.
However, now I have some new requirements. My domain contains many different sites setup among different subdomains. I have two DNS subdomains that map to this application. One is aaa.mysite.com and the other is www.mysite.com. If a particular web request is received from subdomain aaa.mysite.com for a page protected by FormsAuthentication, before the FormsAuthentication logic is handled (the user would be re-directed to the login page), I want to execute some code first. This code would essentially try to read a cookie from a third subdomain, say zzz.mysite.com, and if does not exist, Response.Redirect to a login page in the zzz.mysite.com application.
I tried handling this via a base class that any of my Forms Authentication protected pages could inherit from, and then calling the special code in the Page_PreInit function. However, FormsAuthentication handles the redirect to the Login page even before the PreInit function is called.
Does anyone know a good way to handle this case? If Page_PreInit won't work, where can I put code so that it executes prior to the FormsAuthentication redirect does, but where I also have access to which page it is (and what class it inherits from, so I can see if it inherits from System.Web.UI.Page or if it inherits from my special BasePage).
I think I could use the Globals Application_BeginRequest, but then this would be called for every single request, which doesn't seem like a very good idea.
I can't be the first person who has needed a way to handle an event prior to the FormsAuthentication
I have a SqlDataSource setup in the markup on my page. After some new requirements, I am trying to find a way to modify the SelectCommand before the data is filled for the first time. The SelectCommand below will now be used by default since we'll always have the first param. I am faced with a need to modify the SelectCommand though, adding a second session parameter along with it. I tried to override the OnInit method but it didn't seem to help...it still used the default query. Is there a best way to accomplish this? Here is the section of markup I am referring to:
I have an aspx page with multiple modal popups. These modal popups are trigger in the page behind code using .Show() and .Hide().
This is what I have in the .aspx page for the particular modal popup under discussion:
[Code]....
The example below demonstrates the type of calls I am making to the modal popup extenders. Basically using the Datalist item command, the datalist commands are responsible for triggering my modal popups.
[Code]....
They all work fine after postbacks except the "activityReport" case (the last one). The only difference with this modal popup is that it contains a user control and all the postbacks are happening in the user control. So the problem is that in the last case whenever a postback happens in the user control then the modal popup is close.
1. If I separate the modal popup and place it in a page all by itself and trigger it to .Show() through a button click in the page behind code then the modal popup doesn't close. See below example.
[Code]....
2. The button click event in the test page looks as follow: