postback

No postback after Javascript function

白昼怎懂夜的黑 提交于 2019-12-23 03:08:47
问题 This element <asp:DropDownList ID="ItemDropDownList" runat="server" AutoPostBack="true" OnChange="setHidden()" .... > Doesn't do postback when I use OnChange attribute. Even if I do it manually: function setHidden() { ... ... _doPostBack("",""); } What's wrong? 回答1: Use return statement instead of doing post back. <asp:DropDownList ID="ItemDropDownList" runat="server" AutoPostBack="true" OnChange="return setHidden()" .... > function setHidden() { ... .... return true; // you can return false

Is there a way to do low-level debugging of ASP.NET PostBacks

房东的猫 提交于 2019-12-23 02:58:13
问题 I'm having a problem with a user control I'm developing which contains a ListView bound to an ICollection<T> and a DataPager . What I'm finding is that when the pager links are clicked, a PostBack is initiated and the Page_Load and Page_PreRender events are hit, but my DataPager's PagePropertiesChanging event handler method is never fired. The control I'm developing is used in a Sitecore website which may possibly be causing ClientID 's to get messed up preventing postback events to be

Causing a PostBack to a different page from a PopUp

时间秒杀一切 提交于 2019-12-22 16:37:44
问题 I have a main page and a details page. The details page is a javascript popup invoked from the main page. When the 'save' button is clicked on the details page, I want the main page to 'refresh.' Is there a method of invoking a postback to the main page while also maintaining the save postback from the details page? Edit - Using window.opener.location.reload(true) does work, but it prompts the user to resend information. This 'document.location.href = document.location.href;' does not work

Make postback when the OkButton in a ModalPopup is clicked in ASP.NET AJAX

余生长醉 提交于 2019-12-22 12:18:10
问题 I follow the example in Atlas: Creating a Confirmation Using the ModalPopup Extender to make a postback when the OkButton in a ModalPopup is clicked (it uses the ModalPopupExtender that comes in ASP.NET Ajax Control Toolkit), but as I can see, the Sys.WebForms.PostBackAction() is no longer present in ASP.NET AJAX (the example is for Atlas). When I run it the "Microsoft JScript runtime error: Object expected" error message raises, in the line in javascript where I create the PostBackAction.

ASP.NET CheckBox not checked on postback without weird hack

被刻印的时光 ゝ 提交于 2019-12-22 10:06:53
问题 I have a GridView with a checkbox column. On clicking a button, all rows with the checkbox checked should be removed. I somehow stumbled upon a strange and hacky solution, and I have no idea why it works. I already searched through related SO questions already. Related code: Protected Sub Page_Init(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Init ' I have no idea why this is needed for the checkboxes to work... Dim x = imageGridView.Rows End Sub Protected Sub RemoveButton_Click

user control event handler lost on postback

走远了吗. 提交于 2019-12-22 08:29:38
问题 I have a menu usercontrol called LeftMenu that has a bulletedlist of linkitems. It's on the ascx page as such: <asp:BulletedList ID="PublisherList" DisplayMode="LinkButton" OnClick="PublisherList_Click" cssClass="Menu" runat="server"></asp:BulletedList> I databind the list in the page_load under if(!isPostBack) I'm having an issue on a page that loads the control. When the page first loads, the event handler fires. However, when the page posts back it no longer fires and in IE8, when I'm

how to deal jquery ajax with jsp for database update?

邮差的信 提交于 2019-12-22 00:14:44
问题 I have used ajax with jquery and my ajax url is calling another jsp page which submits form data to database the problem is whenever I'm running the insert query, its replying "Null values can't be inserted to database" kinda exception, but whenever I'm reloading same page and clicking submit button, its getting submitted to database. I think the problem is with something like postback method, I'm new to ajax so please need your help... <html> <head> <script type="text/javascript" src="http:/

Does not appear to be emitting correct GridView markup for __doPostBack

梦想与她 提交于 2019-12-21 19:51:55
问题 I asked this question regarding a strange behaviour from a GridView control in ASP.Net (I'm using C#). For each row in my GridView there is an an 'Edit' and 'Delete' link. The edit for example has this javascript:__doPostBack('gvwServers','Edit$0') - So obviously the server is going to figure out someone has clicked to edit row 0 of gvwServers . Fair enough. If I click the Edit link I get a postback and the GridView is redrawn with the Edit button replaced with an 'Update' and 'Cancel' button

Run javascript after form submission in update panel?

删除回忆录丶 提交于 2019-12-21 18:35:44
问题 This is driving me crazy! I have read at least 5 questions on here closely related to my problem, and probably 5 or so more pages just from googling. I just don't get it. I am trying to have a jqueryui dialog come up after a user fills out a form saying 'registration submitted' and then redirecting to another page, but I cannot for the life of me get any javascript to work, not even a single alert. Here is my update panel: <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp

ASP.Net 4.0 with TinyMCE and XML Encoding re-encodes Content on Postback

◇◆丶佛笑我妖孽 提交于 2019-12-21 12:38:08
问题 i have a ASP.NET 4.0 based CMS, where i use the TinyMCE (3.4) via jQuery to edit one Textbox. In addition to this i have several other textboxes. There is also another DropDown List on the Page, which controls the Contenttype. This Control has AutoPostback enabled and sets the visibility on the textboxes regarding the selectes item. As i want to keep the Postback Validation on i have configured the TinyXML to use xml for the content serialisation (encoding: "xml"). Now i have the problem,