Web Forms :: Want To warn The User when Moving Between Panels On A Page
May 8, 2010
I have four panels on a page, each with a submit button. I want to warn the user when they move from one panel to another without having submitted any changes from the first panel. I've worked this out in Javascript but it would be better to do on the server side, and disable all submits except the panel with changed content. How would I do this? With a Sub that responds to ontextchanged? Or with comparison validator? Or some combination of the two?
I'd like to know how I can warn a user when they're leaving a page where they've changed data (i.e. "You have unsaved data on this page, are you sure you want to abanon it?"). For example, the page has a few dropdown lists, some textboxes, etc. I'd like to warn them if they try to leave the page before saving the data. How can I do this? To add to my confusion, I also have a dropdown menu control (skmMenu) on the page that doesn't seem to have any events I can tie into.
I'm getting this error code in a voting system which I made.
"Violation of PRIMARY KEY constraint 'PK_Awards'. Cannot insert duplicate key in object 'dbo.Awards'. The statement has been terminated."
It's good because it means I am stopping people from voting twice, however, I want to display an error message in the site, and I want to make this occurance user friendly, as I have no idea how this error will look when the website is live.
Here is all of my code:
[Code]....
How will this error look when the website is live? How can I display a message to warn the user that he has already voted?
In a ASP.NET application I have a paging RadGrid which shows up textbox in each row. Outside the grid, there is an OK button to save the content of all the textbox. If user changes text in any one or more of the textbox and without clicking on the "OK" button, tries to move to a different page number (of the grid by clicking on the page number), he should be prompted for confirmation of save or cancel the changes.
I am guessing that one can write a Javascript function which would look for any form input control (textbox in my case) and detect changes and If there are changes, would prompt the user. However, I am not sure where I can call this function from?
I am using RadGrid but I guess this should be applicable to GridView as well.
i have created an user control with a text box and a list control inside ajax update panel to create a control like the google search text box which floods the values as the user types in.
its working fine too...now whats my problem is that when i am trying to use two user controls that i created in the same page. when i am running the page am able to use only the second user control. when i start typing in the first control the focus control is getting passed to the second one automatically and i am not able to type in anything in the first control.
what can be the reason? am using only one script manager for both. the update panel is inside the usercontrol.
I want to execute url but not to redirect to that page.My work should be cout. on the same page.. Eg :When i click on "Send" it should send that data to url bt page has to be same no effect should be their . .
I have a page that has the layout seen below (Keep in mind this screenshot is from another one of posts) so it has explanations about that issue and not this new post. But I cant create a new image, so it will work to show what I am having issues with. When you arrive to the page you get the first in the image below. The DVR search is already expanded and you can select a name and search or chose a different type of type. I have the gridview below tied to my objectdatasource which works great and was working great until we added the collapsible panels. If I perform a search on DVR name, results are returned in the image view and everythign works. I can then change to List view and that works great.. gridview binds and all functionality works. But the issue now is if I click on the "Date Search" link on the Search Options menu, my panels expand and collapse as expected now that I clicked Date Search, I enter my dates adn click search and results are returned..
Then the issue is that sorting doesn't work. But it does work for the initial search IF performed by the DVR Name. Searching by DVR name sorting and paging works.. but i change to another panel and hit search, the gridview is updated with new results but the sorting doesnt work. I receive this error when I try the date search.. same for All other searches except the first one. Is having the textboxes within a collapsible panel causing my issue? Error message when I click a column to sort on. But like I said, if I just do a search using the first open panel which is the DVR name, sorting works fine. ObjectDataSource 'ObjectDataSource1' could not find a non-generic method 'SelectInfo' that has parameters: sdate, edate. Here is my gridview control code.. [Code]....
I am making one application where i am fetching huge data from database to gridview.
for this it was taking some 30 to 40 seconds. so instead of showing nothing in the page
I am using update panel and update progress bar.
everything is ok but when progress image is showing in the page that time it's moving only one time and stop and before completing page postback.
Here is my code:
 <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">   </asp:ToolkitScriptManager>   <div><script language="javascript" type="text/javascript">   var prm = Sys.WebForms.PageRequestManager.getInstance();  var popup = $find('<%= modalPopup.ClientID %>');   prm.add_initializeRequest(InitializeRequest);  Â
[Code] ....
And here is my code behind:
 protected void Button1_Click(object sender, EventArgs e)   {       con.Open();       SqlCommand com = new SqlCommand("select * from processdailydata", con);       SqlDataAdapter sda = new SqlDataAdapter(com);       DataSet ds = new DataSet(); sda.Fill(ds);       GridView1.DataSource = ds;       GridView1.DataBind();       con.Close();   }
i want to show progress image move regularly untile page load is not finished.
I was asked if I could make some kind of alert to pop up 3 different statuses, a green light for - server good, a yellow light for - the server is experiencing technical difficulties and not may be running properly and a red light for - server is down.
So how would I go about doing that in an employees Intranet page so they can see if there is problems with the server if they are trying to log in and work.
I know they work with Visual Studio 2010 and probably work with IIS - so just in case if they work with Apache.
I've seen 100s of posts on how to change the mouse cursor using JavaScript/CSS. I know how to do that. Problem is, how do you get the browser to actually respect the change without the user moving the mouse? Update the cursor immediately, not wait for the mouse to move.I'm actually not even trying to change the mouse cursor, as much as just having dynamic content change that may end up with the mouse being over a different target now, and the new target now should have a different mouse cursor than the previous target. but IE7/8 and Chrome do not update the mouse cursor when this happens. They only update it next time the user moves the mouse. Firefox (3.5) seems to update correctly, but I haven't tested it a lot.
For example, the user clicks a control on my page, and maybe another control opens due to the click (maybe a modal dialog). Now maybe there is a different control under the mouse, but the mouse is still showing the cursor of the control the user originally clicked.
We are moving some applications from Server 2003 to Server 2008R2 (IIS 7.0)
Have following code that does not seem to work on 2008:
Code: If InStr(1, UCase(Request.ServerVariables("LOGON_USER")), "") > 0 Then Dim Splits() As String = UCase(Request.ServerVariables("LOGON_USER")).Split(""c) Session("@User_Id") = Splits(1) 'this will be second part End If
We are using the 'log on' to check whether a user is authorized to an application. This working fine in 2003.
Is there an equivalent in 2008 or even better, something that works both in 2003 and 2008?
I am having a change password page in that when the user change his password and click on submit i will show a message and will redirect to main form. But the text which i like to display is not displaying. What i need is i would like to have the page in the same form for few amount of time and then redirect to the desired one.
<script type="text/javascript">function LoadPage() { var v =setTimeout("MovePage()",5000); //will call the MovePage() function after 5 seconds } function MovePage() { location.href='/FedData/newRoutingNumbervalidator.aspx'; } </script>
Have two collapsible panels on my page. When I open the top one (which has a panel and txtbox/label controls) it doesn't push down the other collapsible panel. It just covers it.
I'm using ajax 3 tab panels on my web page, whenever my web page is loaded i need to disable rest 2 tabs (to grey out with no click events).
when i tried to do this from server side, the tabs are completely hidden instead of disabling. My actual requirement is to use tab container as asp wizard control.
i'll be having form fields in my first tab with submit button, when the submit button is clicked, then the disabled second tab will be enabled and in the the second tab when submit button is clicked the third tabpanel needs to be enabled just as a wizard control.
i can use wizard control but, i'vent found any styled asp.net wizard control. How can i disable rest of the 2 tabs when the page is loaded.
i have 3 update panels on the same page with labels that are showing different countdown and i want then to run separate from each other. I've tried to use timer control that triggers each of them separatley with limitations in ontick event., the coutdowns are strating but after a few seconds are stoping and i don't know why.i'm not using scripts. I want to run like those on mafia wars on Facebook when something is done to start one contdown and something else other timer.
I have used Master Pages with ASP.Net for some time. I have been able to develop Master pages with header and footing content but never sucessful with side panels.What this project needs is a Main Master page with header and footer contents. Then another master page that uses the first master page and has it's content of the left side of the remaining middle. The Detail will go to the right with the left master content about one third and the detail about two third.
Anyone know of a way to read out in a list all of the UpdatePanel Client ID's I have on a page? Basically I need to loop through all controls in the page with a type of UpdatePanel, and display the ClientID for each..
I have four update panels on this page and I am using this
private string LoopUpdatePanel(ControlCollection controlCollection) { StringBuilder sb = new StringBuilder(); foreach (Control control in controlCollection) {
What are the latest and greatest ways to move ViewState to bottom of the page Can this be done in a IHttpHandler that can be specified in the web.config to intercept requests to "*.aspx"?
Other options is that this could be done in a IHttpModule, but that is not as performant, as it will intercept all requests. Also it could be done in an a class deriving from the Page or MasterPage-class, but this is not as modular.Are there any performance penalties to this?