autopostback

RequiredFieldValidator not working under firefox

Hi guys I use 2 requiredfiledvalidator for 2 selects, one is working but the second one (the one I need) isnt <asp:dropdownlist id="ddlMod" runat="server" Width="235px" AutoPostBack="True" Font-Names="Arial" Font-Size="XX-Small"> </asp:dropdownlist> <asp:requiredfieldvalidator id="RequiredFieldValidator1" runat="server" Font-Names="...

AutoPostback from Html.Listbox in ASP.NET MVC?

Now, i may very well just be being incredibly thick, but I'm struggling to find how to do autopostback with a Html.Listbox in ASP.NET MVC 1. What I'm trying to achieve is just a simple if value of ListBox1 is x then the values in ListBox2 are y, if I change the value in ListBox1 to z then I want the values of ListBox2 to change based of...

How can I delay a ASP.NET AutoPostBack so JavaScript fires first?

I've got an odd situation with a text box and an autocomplete setup on my page. I'm using a JQuery based autocomplete on a text box that has AutoPostBack="True". This works perfect if I use the keyboard to select an autocomplete item, which then fires Jquery to fill in the text box, and then when I tab out of the box the AutoPostBack fir...

C# GridView dynamically built columns with textboxes ontextchanged

My page is a bulk order form that has many products and various size options. I've got a gridview that has a 3 static columns with labels. There are then some dynamically built columns. Each of the dynamically built columns have a textbox in them. The textbox is for quantity. Trying to either update the server with the quantity entere...

Why SelectedIndexChanged fires for a DropDownList when a button is clicked?

I have an ASP.NET DropDownList with AutoPostBack=true and EnableViewState=false. I have a button on the page that does nothing. If I change the selection in the ddl, it posts back , which is expected. If I click the button, the page posts back and the ddl's SelectedIndexChanged fires. Why does it get fired? ...

Selected Item not being updated?

I've got the following DropDownList control: <asp:DropDownList ID="SubjectFilter" runat="server" AutoPostBack="True" onselectedindexchanged="SubjectFilter_SelectedIndexChanged"></asp:DropDownList> SubjectFilter data: BookStore b = new BookStore(); b.LoadFromXML(Server.MapPath("list.xml")); SubjectFilter.DataSource = b.BooksList.Sele...

Are the ASP.net __EVENTTARGET and __EVENTARGUMENT susceptible to SQL injection?

A security review was done against one of our ASP.net applications and returned in the test results was a SQL Injection Exposures considered to be a high risk item. The test that was performed passed a SQL statement as the value of the __EVENTTARGET and the __EVENTARGUMENT. I am wondering since these 2 values are ASP.net auto-generated...

JavaScript "confirm" on SelectedIndexChange of RadioButtonList

I have a RadioButtonList control and I would like to do a Javascript "confirm" when a user tries to change the index. Currently AutoPostBack is set to TRUE. I can, of course, just call __doPostBack from within a javascript function, etc. I tried a few things with jQuery but you have to worry about mousedown vs. click and then there is...

How to enable html select post back apsx page when selection changed?

With asp.NET control dropdownlist, there is a property AutoPostBack, if it is set "True", the whole page will be posted back. If the aspx page include a html element "select" like: <select id="list" name="list" runat="server" DataTextField="Name" DataValueField="ID" ></select> and it data is filled by code-behind. Question is: ...

Dropdown OnSelectedIndexChanged not firing

The OnSelectedIndexChanged event is not firing for my dropdown box. All forums I have looked at told me to add the AutoPostBack="true", but that didn't change the results. HTML: <html xmlns="http://www.w3.org/1999/xhtml"&gt; <head runat="server"> <title></title> </head> <body> <form id="form1" runat="server"> <div> <a...

Have to click button twice in asp.net (after autopostback textbox)

On a page I have: <asp:TextBox runat="server" ID="EmailTextBox" AutoPostBack="true" OnTextChanged="EmailTextBox_Changed" /> <asp:Button runat="server" ID="SearchButton" OnClick="AddButton_Click" Text="add" /> In EmailTextBox_Changed, it counts up how many emails can be found, before running the search. The problem is, when you type s...

ASP.NET MVC autopostback drop down not working

With the following code: <script type="text/javascript" src="../../Scripts/jquery-1.4.1.js" /> <script type="text/javascript"> $(function () { $('#selectOptions').change(function () { $(this).parents('form').submit(); }); }); </script> ... <% using (Html.BeginForm("PostedValue", "Home")) { %...

DropDownList switches from Spanish into English?

Why would a DropDownList switch from Spanish into English when one selects a new item in it? And how does one prevent that from happening? <asp:DropDownList ID="ddl_r1pc" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlRelationship_SelectedIndexChanged"> <asp:ListItem></asp:ListItem> <asp:ListItem ...

ASP.NET No postback on asp:ImageButton

Hello, I have an ASP page with an asp:DropDownList (with AutoPostBack="true") so that when the user changes it, it reload the appropriate data. Under that control i have a list of UserControls, that includes a tinymce editor (tied to an asp:TextBox) and an asp:ImageButton to save the data. When clicking on the ImageButton, the applica...

System.ArgumentNullException when adding AutoPostback to DropdownList

Hi, When I add AutoPostback = True to my DropDownList (with OnSelectedIndexChanged) I get a System.ArgumentNullException: Value cannot be null. My control looks like this: <asp:DropDownList ID="dropdown" runat="server" AutoPostBack="true" OnSelectedIndexChanged="dropdown_OnSelectedIndexChanged" /> And code to fill control: dr...

C#: Preventing AutoPostBack according to a confirmation dialog

I want to show a confirmation dialog when a specific value is selected in an asp:DropDownList. If the confirmation dialog returns false (cancel) then I want to prevent the AutoPostBack. <asp:DropDownList id="theDropDownID" onchange="foo()"></asp:DropDownList> However, it ignores the returned value from foo() and actually does the post...

second time click of a button inside updatePanel, the event does not fire in jquery

Hi, In my aspx file, I have: <asp:UpdatePanel ID="UpdatePanel3" UpdateMode="Always" runat="server"> <ContentTemplate> <asp:Button ID="Button1" runat="server" Text="Button" /> </ContentTemplate> </asp:UpdatePanel> In javascript file I have: $('#ctl00_ContentPlaceHolder1_Button1').click(function (e) { alert('hel...

Handling events triggered from controls programmatically added to the page?

I am programatically adding a control to an aspx page and binding a server side event to an index changed event inside the control. (It's a RadListBox from Telerik's ASP.NET controls) The problem is that on the postback triggered from the control, the event doesn't hit its eventhandler because on the postback the control isn't defined. ...

Autopostback and doPostBack conflict

I have enabled the AutoPostBack property of one of my form's textboxes, which according to w3 schools should only trigger a postback when I press enter or tab. I am also calling a __doPostBack() on pageLoad, given a user's answer to a javascript prompt. When I do that, the Request.Form['__EventTarget'] is not what I set it to be in the...

With 'AutoPostBack=false', how do I trigger the postback that would have executed after running some JavaScript?

With AutoPostBack=false, how do I trigger the postback that would have executed after running some JavaScript? ...