postback

How to use a custom ValidatorUpdateDisplay function when the controls / validators are loaded on postback in an UpdatePanel the first time?

丶灬走出姿态 提交于 2019-12-11 08:08:07
问题 In ASP.NET when using validation controls (i.e. RequiredFieldValidator ) the client sided framework will execute the JS function Page_ClientValidate . This function will validate all controls on the page (of the given ValidationGroup ) and call the JS function ValidatorUpdateDisplay with a parameter of the DOM element of the span tag of the validator control. ValidatorUpdateDisplay toggles the visibility of the span tag depending on the result of the validation. In my web application I've

Custom Control loads a user control; Postback events are not triggered

半腔热情 提交于 2019-12-11 07:46:37
问题 I have a custom control (compiled as a DLL) which loads a user control. (i.e, the custom control does a LoadControl) In the user control is a button and a textbox. I wire up the button's click event. I type in a value into the text box. When I click the button, the page does a postback. My user control knows that a postback occured because Page.IsPostBack = true. However, the click event of the button is never fired and my text box has also lost the value that I typed in. Anyone have any

Zurb-Foundation Maintain Tab State

廉价感情. 提交于 2019-12-11 06:38:28
问题 What's the best way to maintain the state of a Foundation tab on postback? Preferably a way that doesn't use cookies. <dl class="tabs"> <dd class="active"><a href="#simple1">Simple Tab 1</a></dd> <dd><a href="#simple2">Simple Tab 2</a></dd> <dd class="hide-for-small"><a href="#simple3">Simple Tab 3</a></dd> </dl> <ul class="tabs-content"> <li class="active" id="simple1Tab">This is simple tab 1s content. Pretty neat, huh?</li> <li id="simple2Tab">This is simple tab 2s content. Now you see it!<

Why am I losing object references on the postback?

会有一股神秘感。 提交于 2019-12-11 06:37:21
问题 I am developing an asp.net (3.5) application and I am puzzled with the behavior of the postbacks. Consider the following scenario: I have a web user control that is basically a form. However each form field is a web user control in itself. In the click event of the save button I iterate through all controls in my form and I retrieve the field value and the field name that refers to the database field that I am saving the value to. The click event triggers a postback and it is during the

ASP.Net's auto-postback. What happens when its too slow?

本秂侑毒 提交于 2019-12-11 06:11:46
问题 I am making a web application. I have gotten a weird error with update panels. Ok, so say you have two update panels and each update panel has a textbox in it. Both of these textboxes are auto-postback and the update panels update conditionally. Well, from the behavior I'm observing it seems like if the server isn't faster than the user at processing a request then it sorta gets ignored on the client side. Like say you type something in 1 of these text boxes and then quickly tab to the next

ASP.NET next/previous buttons to display single row in a form

不羁岁月 提交于 2019-12-11 05:27:09
问题 I'm looking for the best way to implement this in ASP.NET. On the page, the user has an option to "page" through subscription numbers with next and previous buttons. When the user clicks the next/previous buttons, the page is posted back (partial, AJAX) and the subscription details is displayed in a form. There is only one row displayed at a time. There is like 10,000 subscription numbers, so if we can avoid loading all the subscription numbers on every postback, we would prefer that. Somehow

__doPostBack() function isn't working (asp.net)

不羁岁月 提交于 2019-12-11 04:54:11
问题 I am trying to trigger button event from the JS code. But doPostBack in JS function reg() is not directing to the c# code. Please tell me what's wrong. Here is my code: <script> function reg() { var name = document.getElementById('name').value; var id = document.getElementById('cnic').value; var age = document.getElementById('age').value; var ph = document.getElementById('phone').value; var pas = document.getElementById('pass').value; if (id == '' || pas == '' || age == '' || ph == '' || pas

Why won't postbacks work on my domain root?

孤者浪人 提交于 2019-12-11 04:37:25
问题 I have a form on a masterpage which is very simple but will not work when the site is at the root. Works fine: www.mysite.com/page.aspx www.mysite.com/another/page.aspx Does not work: www.mysite.com I click the button and it postsback to www.mysite.com/default.aspx But nothing has executed, now if I try the form again on /default.aspx it will postback and execute fine. What am I doing wrong? 回答1: It sounds to me like the default page redirection is either accidentally (or intentionally)

ASP.NET: Find which element had focus before postback?

China☆狼群 提交于 2019-12-11 04:36:32
问题 I have a series of controls on a page, including some textboxes that serve to record employee timesheet. When OnTextChanged fires, the page postback and update the overall working hours and minutes. The problem is, when the user clicks the save button, a postback happens, but it is not because of save button 's action but because OnTextChanged has fired. The user believes that the saving has gone well until he/she access the page again and doesn't find his/her data. It's next to the

asp.net Dropdownlist conditional postback

孤人 提交于 2019-12-11 03:44:03
问题 I have a dropdownlist and have an event selectedIndexChanged which postsback, i want to be able to show a message to the user whenever he changes the value in dropdownlist, based on the input from the message i will decide if i have to postback or not. The message shown would be are you sure? if he selects yes i would continue with postback, if he says no, i would cancel the postback and assign the previous value as selected. I have searched alot but cant figure out a solution to this, i