postback

ASP.NET - Control Events Not Firing Inside Repeater

独自空忆成欢 提交于 2019-12-21 09:33:54
问题 This is a absurdly common issue and having exhausted all of the obvious solutions, I'm hoping SO can offer me some input... I have a UserControl inside a page which contains a repeater housing several controls that cause postback. Trouble is, all of the controls inside of the repeater never hit their event handlers when they postback, but controls outside of the repeater (still in the UC) are correctly handled. I already made sure my controls weren't being regenerated due to a missing if(

ASP.NET UpdatePanel and Javascript __dopostback

你说的曾经没有我的故事 提交于 2019-12-21 01:12:50
问题 I'm calling a partial postback from javascript like so: function GetPolicyClick() {"__dopostback('UpdatePanel1', 'PostCall')";} It does 1/2 of what I need it to. It does call a partial postback, just for my UpdatePanel. Now the tricky part. I'm trying (somehow) to reference the second argument of __dopostback in my code behind. This does not work: Private Sub UpdatePanel1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles UpdatePanel1.Load Dim MyArg As String = Request("_

ASP.NET UpdatePanel and Javascript __dopostback

∥☆過路亽.° 提交于 2019-12-21 01:12:48
问题 I'm calling a partial postback from javascript like so: function GetPolicyClick() {"__dopostback('UpdatePanel1', 'PostCall')";} It does 1/2 of what I need it to. It does call a partial postback, just for my UpdatePanel. Now the tricky part. I'm trying (somehow) to reference the second argument of __dopostback in my code behind. This does not work: Private Sub UpdatePanel1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles UpdatePanel1.Load Dim MyArg As String = Request("_

AsyncPostBackTrigger not working in my application

一笑奈何 提交于 2019-12-20 05:54:32
问题 I am experiencing an interesting issue. We are running a website using masterpage and in one of the pages, I need to create an update panel that will display group SSID on completion. So, in one of the content placesholders, I put this in: <asp:ScriptManager ID="scManagerConfirm" runat="server" /> <asp:Timer ID="tmrStatus" OnTick="tmrStatus_Tick" Enabled="false" runat="server" Interval="5000" /> <asp:UpdatePanel ID="upnlStatus" runat="server" UpdateMode="Conditional"> <Triggers> <asp

How to prevent page being postbacked when i transfer item from one listbox to other

╄→尐↘猪︶ㄣ 提交于 2019-12-20 04:42:09
问题 I have two listboxes in my application on button click i am pushing the item from one list box to other , the code works fine but it causes postback , while i move the item from one list box to other whole page is being loaded again , how i can prevent this . This will be the code on my aspx page <div class="bx1"> <telerik:RadListBox ID="RadListBox1" runat="server" DataTextField="Name" DataValueField="Id" Width="250px"> </telerik:RadListBox> </div> <div style="height:7px"></div> <div class=

Setting ASP.NET Button attributes client side and read attribute value server side

こ雲淡風輕ζ 提交于 2019-12-19 19:53:25
问题 How can I retrieve a Button custom attribute after the attribute value has been changed using javascript? Example: Asp file <asp:Button ID="Button1" runat="server" Text="Button1" /> <asp:Button ID="Button2" runat="server" Text="Button2" OnClick="Button2_Click" /> <script type="text/javascript"> var btn1 = '#<% Button1.ClientID %>'; var btn2 = '#<% Button2.ClientID %>'; $(btn1).click(function(e) { e.preventDefault(); $(btn2).attr("actIndex", "2"); }); </script> CodeBehind file protected void

.NET DropDownList SelectedIndexChange Event Not Firing in IE 10

旧街凉风 提交于 2019-12-19 18:28:10
问题 In IE 10, when a drop down list selected item is changed, nothing happens. It doesn't post back. All other controls work except for drop down lists. It appears to work when I switch to IE 10 compatibility mode. 回答1: Scott Hanselman explains this on his blog. http://www.hanselman.com/blog/BugAndFixASPNETFailsToDetectIE10CausingDoPostBackIsUndefinedJavaScriptErrorOrMaintainFF5ScrollbarPosition.aspx 回答2: Do you have the ASP.net Hotfix for IE10 installed? 回答3: Ok, this was a weird issue. The

How to resolve the “Error: WebForm_DoPostBackWithOptions is not defined”?

Deadly 提交于 2019-12-19 11:43:39
问题 I have an application that is working fine at my local end but when I host it on server, not a single button's click fires. I am getting the Following error: Error: WebForm_DoPostBackWithOptions is not defined I don't understand why I am getting this error as I updated the bin folder Ajax dll and I have installed framework 4.0 on the server but still iI am getting that error. I have already tried the following link: WebForm_DoPostBackWithOptions is not defined 回答1: i had this problem before,

ASP.net Dynamically adding controls on Button press. Postback issue

柔情痞子 提交于 2019-12-19 11:25:43
问题 I have a user control which contains several buttons, depending on the button pressed a different control is added to the page (lets say button 1 adds a TextBox, button2 adds a label). I have code along the lines of: protected void but1_click(object sender, EventArgs e) { TextBox tb = new TextBox(); tb.ID = "tb1"; paramsCtrlDiv.Controls.Add(tb); } protected void but2_click(object sender, EventArgs e) { Label lb = new Label(); lb.ID = "lb1"; paramsCtrlDiv.Controls.Add(lb); } I then have a

Determine if and which partial postback occurred in pageLoad() with JavaScript in .NET

泄露秘密 提交于 2019-12-19 09:05:18
问题 As I understand it, partial page updates with ASP.NET AJAX cause the JavaScript pageLoad() event handler to be invoked. My question: Is there a generic way of determining in JavaScript from within the pageLoad() function... i) If the postback was a partial page update or not. ii) If so, which panel was updated. My application uses a combination of .NET UpdatePanels & Telerik RadAjaxPanels. I'm looking for a generic (preferably JavaScript) solution which doesn't require me to specify a unique