Search Results

Search found 171 results on 7 pages for 'autopostback'.

Page 4/7 | < Previous Page | 1 2 3 4 5 6 7  | Next Page >

  • ASP.NET Call Another Element's DoPostBack Function

    - by blu
    I have an ASP.NET control that has an onclick event handler rendered inline on the element. I would like to call that function and have it raise the target control's server side event handler. <asp:CheckBox ID="Foo" runat="server" AutoPostBack="true" Text="Foo" /> <a href="#" onclick="javascript:setTimeout('__doPostBack(\'Foo\',\'\')', 0)">Test </a> I created the checkbox, looked at the rendered function on the field, and then copied that into the onclick on the anchor element. The anchor will raise a postback, but the event handler for the check box is not raised. protected override void OnLoad(EventArgs e) { // fires for checkbox // fires for anchor (the anchor does cause a postback) } void Foo_CheckedChanged(object sender, EventArgs e) { // fires for checkbox // does not fire for anchor } protected override void OnInit(EventArgs e) { this.Foo.CheckedChanged += new EventHandler(Foo_CheckedChanged); } Is it possible to do this?

    Read the article

  • How to manipulate data in View using Asp.Net Mvc RC 2?

    - by Picflight
    I have a table [Users] with the following columns: INT SmallDateTime Bit Bit [UserId], [BirthDate], [Gender], [Active] Gender and Active are Bit that hold either 0 or 1. I am displaying this data in a table on my View. For the Gender I want to display 'Male' or 'Female', how and where do I manipulate the 1's and 0's? Is it done in the repository where I fetch the data or in the View? For the Active column I want to show a checkBox that will AutoPostBack on selection change and update the Active filed in the Database. How is this done without Ajax or jQuery?

    Read the article

  • jquery datepicker predefined date

    - by r3try
    This might seem like a stupid easy question to some of you, but i'm new to jquery and can't get my datepicker to work like it should. This is my textbox where the datepicker is attached to: <asp:TextBox runat="server" ID="StartMonth" AutoPostBack="true" class="month-picker" /> and here is how i attach the datepicker. (I have multiple TextBoxes where the datepicker should be attached to, so i used the class attribute instead of the id.) $(".month-picker").datepicker({ dateFormat: 'MM yy', changeYear: true, yearRange: '-9:+9' }); What i want to archive is when i click into the textbox where the text is "August 2012" it should set the pre-selected date of the datepicker to this date. Can anyone help? Kind regards.

    Read the article

  • can't see the result after i update a row in a table in a gridview

    - by aleo
    Peace! i created a gridview and ive bended the data using a ObjectDataSource, for some reasons i created the CRUD methods to do the work instead of using the CRUD method generated by the LINQDataSource; everything is just working fine but the update method, when i update a row in my gridview everything become as if there isnt any update! but when i check the database i can see that the rows is been updated! i can't find a solution (yet) to this issue. i'am using the updatepanel to have the autopostback without refreshing the page. thank you

    Read the article

  • How to execute in javascriptfunction in asp.net c#

    - by shree-khanal
    i have a textarea which i want to disable when I check a checkbox. I made a working demo in plain html and javascript, but When I am migrating to Asp.net, neither the function is being executed nor I can keep the onselect event in my check box. <asp:CheckBox ID="ChkOthers" runat="server" Text="Others(Please Explain)" Width="205px" AutoPostBack="True" OnCheckedChanged="ChkOthers_CheckedChanged" /></td> <asp:TextBox ID="TxtOtherReason" runat="server" MaxLength="1024" TextMode="MultiLine" ></asp:TextBox></td> i want to create client side validation when check box is checked textbox is enable else disable.

    Read the article

  • Referencing a control inside a XSL Template from code behind ?

    - by Mina Samy
    Hi all I have a custom NewItem.aspx that I made by creating a new aspx from the exisiting one I wanted to put a control in a row inside the XSL Template like this <asp:DropDownList ID="ddlSectors" AutoPostBack="true" runat="server" __designer:bind="{ddwrt:DataBind('i',ddlSectors,'SelectedValue','TextChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@Sector')}"> </asp:DropDownList> <!--<SharePoint:FormField runat="server" id="ff7{$Pos}" ControlMode="New" FieldName="Sector" __designer:bind="{ddwrt:DataBind('i',concat('ff7',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@Sector')}"/>--> <SharePoint:FieldDescription runat="server" id="ff7description{$Pos}" FieldName="Sector" ControlMode="New"/> Now I want to reference ddlSectors from my code library but it always throws an object reference not set to an instatnce of an object. I believe that this is becuase the control is inside the XSL template. so is there any workaround for this ? thanks

    Read the article

  • How to execute in JavaScript function in ASP.NET using C#

    - by shree-khanal
    i have a textarea which i want to disable when I check a checkbox. I made a working demo in plain HTML and JavaScript , but When I am migrating to Asp.net, neither the function is being executed nor I can keep the OnSelect event in my check box. <asp:CheckBox ID="ChkOthers" runat="server" Text="Others(Please Explain)" Width="205px" AutoPostBack="True" OnCheckedChanged="ChkOthers_CheckedChanged" /> <asp:TextBox ID="TxtOtherReason" runat="server" MaxLength="1024" TextMode="MultiLine" /> i want to create client side validation when check box is checked textbox is enable else disable.

    Read the article

  • How to update a control outside of an updatepanel?

    - by Matin Habibi
    Dear all, I am going to show some text in a TextBox, which is located outside of an updatepanel, after checking a CheckBox but I cannot make it work. please help me out ? Here is my code: <asp:UpdatePanel runat="server" ID="uplMaster"> <ContentTemplate> <asp:CheckBox ID="cbShowText" runat="server" Text="Show Some Text" AutoPostBack="true" OnCheckedChanged="cbShowText_CheckedChanged" /> </ContentTemplate> </asp:UpdatePanel> <asp:TextBox ID="txtBox" Text="Empty" runat="server" /> Code Behind: protected void cbShowText_CheckedChanged(object sender, EventArgs e) { txtBox.Text = "Some Text"; } Thanks in advance :D P.S. As you might have guessed, I have resembled my problem and that is why I don't want to put the TextBox in the UpdatePanel

    Read the article

  • How to manupilate data in VIew using Asp.Net Mvc RC 2?

    - by Picflight
    I have a table [Users] with the following columns: INT SmallDateTime Bit Bit [UserId], [BirthDate], [Gender], [Active] Gender and Active are Bit that hold either 0 or 1. I am displaying this data in a table on my View. For the Gender I want to display 'Male' or 'Female', how and where do I manipulate the 1's and 0's? Is it done in the repository where I fetch the data or in the View? For the Active column I want to show a checkBox that will AutoPostBack on selection change and update the Active filed in the Database. How is this done without Ajax or jQuery?

    Read the article

  • Radiobuttonlist and load page in same initial position

    - by Khalid
    Hi I have this simple code in my page, I have a long page, if the client use this button then it shall reload the page and display the page from the beginning. I wish to be reload the page and display from the last position. <asp:RadioButtonList ID="RadioButtonList5" runat="server" AutoPostBack="True" RepeatDirection="Horizontal"> <asp:ListItem Value="45">Sheet2</asp:ListItem> </asp:RadioButtonList> Any advice, apprciated. Thank you.

    Read the article

  • Please help, looking for any answer for long time :How to use SqlDataSource Control to work with Dro

    - by Shantanu Gupta
    I am trying to fetch a column value from a datasource when some value is selected from a dropdownlist on its change event. <asp:DropDownList ID="ddlCityName" runat="server" DataSourceID="dsCity" DataTextField="CityName" DataValueField="CityID" AutoPostBack="True" OnTextChanged="CityName_OnTextChanged"> </asp:DropDownList> <asp:SqlDataSource ID="dsCity" runat="server" ConnectionString="<%$ ConnectionStrings:GmapConnectionString %>" SelectCommand="SELECT * FROM [vcity]" ></asp:SqlDataSource> Here I want to fetch any other column's value that is not binded to a ddlCityName from sqldatasource. I have four columns in datasource i.e. name, id, address, phno. I want to fetch an address of a person who selects some value from ddl.

    Read the article

  • Index Change event for Combobox of gridtemplateColumn in Telerik

    - by Ankur
    I can write a code. In this I can take a Template Column & in this I build a RadCombobox. When it's Index changed I want to affect the below text box. Link the selected value of the Combo box is set as Text on Below TextBox. Combo Box & Text Box are different Controls of Different Template Column. I can Write Control of Combo box like this : <telerik:RadComboBox ID="cmbGID" runat="server" DataSourceID="SqlDataSource8" DataTextField="Name" DataValueField="ID" AutoPostBack="True" OnSelectedIndexChanged="cmbGID_SelectedIndexChanged"> But I don't know the parameters of this event like this : protected void cmbGID_SelectedIndexChanged() { //code... } Any one plz tell me that parameters & tell me is that possible to set txtValue.Text = cmbGID.SelectedValue.ToString()...???

    Read the article

  • How to get a column value contained in SqlDataSource to a variable.

    - by Shantanu Gupta
    I am trying to fetch a column value from a datasource when some value is selected from a dropdownlist on its change event. <asp:DropDownList ID="ddlCityName" runat="server" DataSourceID="dsCity" DataTextField="CityName" DataValueField="CityID" AutoPostBack="True" OnTextChanged="CityName_OnTextChanged"> </asp:DropDownList> <asp:SqlDataSource ID="dsCity" runat="server" ConnectionString="<%$ ConnectionStrings:GmapConnectionString %>" SelectCommand="SELECT * FROM [vcity]" ></asp:SqlDataSource> Here I want to fetch any other column's value that is not binded to a ddlCityName from sqldatasource. I have four columns in datasource i.e. name, id, address, phno. I want to fetch an address of a person who selects some value from ddl.

    Read the article

  • how to add multiview in a radio button

    - by Naveen31
    protected void ddlto_SelectedIndexChanged(object sender, EventArgs e) { } protected void RadioButton1_CheckedChanged1(object sender, EventArgs e) { MultiView1.ActiveViewIndex = 0; } protected void RadioButton2_CheckedChanged(object sender, EventArgs e) { MultiView1.ActiveViewIndex = 2; } <asp:RadioButtonList ID="RadioButtonList2" runat="server" AutoPostBack="True" RepeatDirection="Horizontal" Font-Names="Arial" Font-Size="Small" onselectedindexchanged="MultiView1_ActiveViewChanged"> <asp:ListItem Selected="True">One Way</asp:ListItem> <asp:ListItem>Round Trip</asp:ListItem> <asp:ListItem>Multi City</asp:ListItem> </asp:RadioButtonList> i have a radiolist of thre buttons-one way,round trip and multicity, i have taken a multiview in which in view 2 i have added the codes codes,and i want to show that code when i click on the 2nd radio button i.e on round trip,how to do it. plzz help

    Read the article

  • RadioButtonList javascript firing twice

    - by Muralidhar
    I am working with .NET 1.1. The RadioButtonList's AutoPostBack is set to TRUE. I added a client script to display an alert with the selected value. But, the alert is displaying twice - before and after the post back. Here is the code.. //javascript function getRadioButtonListSelection(radioButtonListId) { var elementRef = document.getElementById(radioButtonListId); var radioButtonListArray = elementRef.getElementsByTagName('input'); var checkedValues = ''; for (var i=0; i<radioButtonListArray.length; i++) { var radioButtonListRef = radioButtonListArray[i]; if ( radioButtonListRef.checked == true ) { checkedValues = radioButtonListRef.value; break; } } alert(checkedValues); } //code behind in Page_load() rbl.Attributes.Add("onclick", "javascript:getRadioButtonListSelection('" + rbl.ClientID + "');"); where could I went wrong?

    Read the article

  • How to use Datasource to fetch some value that has been filled in it.

    - by Shantanu Gupta
    I am trying to fetch a column value from a datasource when some value is selected from a dropdownlist on its change event. <asp:DropDownList ID="ddlCityName" runat="server" DataSourceID="dsCity" DataTextField="CityName" DataValueField="CityID" AutoPostBack="True" OnTextChanged="CityName_OnTextChanged"> </asp:DropDownList> <asp:SqlDataSource ID="dsCity" runat="server" ConnectionString="<%$ ConnectionStrings:GmapConnectionString %>" SelectCommand="SELECT * FROM [vcity]" ></asp:SqlDataSource> Here I want to fetch any other column's value that is not binded to a ddlCityName from sqldatasource. I have four columns in datasource i.e. name, id, address, phno. I want to fetch an address of a person who selects some value from ddl.

    Read the article

  • filtering value of a grid by selecting dropdownlist

    - by Nandini
    I have a grid and dropdownlist.I want to filter values in a grid by the selection of dropdownlist.How Can i do this? My code is like this <asp:DropDownList ID="DDLVisitedVol" runat="server" AutoPostBack="true" DataSourceID="DsVisitedVol" DataTextField="VisitedVol" DataValueField="VisitedVol" Width="244px"> </asp:DropDownList> <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="" ProviderName="" SelectCommand="SELECT [ID],[UserName], [Email], [visitedVol] FROM [HitTracker] where visitedVol=@VisitedVol "> <SelectParameters> <asp:Parameter Name="VisitedVol" Type="String"/> </SelectParameters> How can i pass the selected value of dropdown list to @VisitedVol . If anyone knows pls help me. tHANK YOU

    Read the article

  • Problem with non data bound value in ASP.NET DropDownList.

    - by ProfK
    I'm trying to 'inject' an [All Regions] item into my regions dropdown, as follows: <asp:DropDownList ID="regionList" runat="server" AutoPostBack="true" AppendDataBoundItems="true" Width="200px" DataSourceID="regionDataSource" DataTextField="Desc" DataValueField="RegionId"> <asp:ListItem Selected="True" Value="">[All Regions]</asp:ListItem> </asp:DropDownList> I also have a rank dropdown, for taxi ranks in a region, with the following select parameter: <asp:ControlParameter ControlID="regionList" Name="RegionId" PropertyName="SelectedValue" Type="Int32" DefaultValue="" ConvertEmptyStringToNull="true" /> So the expected behaviour is that when [All Regions] is selected, the ranks dropdown should get a null parameter, and mt SQL selects all ranks, for all regions. I know my SQL works with a null parameter, but the ranks dropdown is not data binding when I select [All Regions] on the region list. It binds when I select a region from the DB, but keeps that binding when I select [All Regions] again. What am I doing wrong?

    Read the article

  • Why my combobox count is 0?

    - by just_name
    Why the count of items in my ComboBox is always 0 although the datasource of this combobox has data !! <div align="right" dir="rtl"> <asp:Label ID="lbl_contactListName" runat="server" Text="Menu Name :" CssClass="span"></asp:Label> <telerik:RadComboBox ID="ddl_contactList" runat="server" AutoPostBack="True" CausesValidation="False" CollapseDelay="0" Culture="ar-EG" ExpandDelay="0" Filter="StartsWith" ItemsPerRequest="10" MarkFirstMatch="true" Skin="Outlook" EnableAutomaticLoadOnDemand="True" EmptyMessage="-New Menu-" ShowMoreResultsBox="True" OnSelectedIndexChanged="ddl_contactList_SelectedIndexChanged" EnableVirtualScrolling="True" DataTextField="list_desc" DataValueField="list_code" DataSourceID="ObjectDataSource1" EnableViewState="true" Width="300px"> </telerik:RadComboBox> </div> <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetContactListsByDep" TypeName="SendSMS_EmailModule.ContactList"> <SelectParameters> <asp:SessionParameter Name="year" SessionField="year" Type="Int32" /> <asp:SessionParameter Name="main_code" SessionField="main_code" Type="Int32" /> </SelectParameters> </asp:ObjectDataSource>

    Read the article

  • ASP.net hiding panel using javascript

    - by Zaps
    Hi, I have a radioButtonList with 2 items in it. A radiobutton with a "Yes" value and a radionButton with a "No" value. Below that I have a panel which I want made visible when "Yes" radioButton is selected and hidden when "No" is selected. I had originally implemented this using the AutoPostBack attribute but I want to do it in Javascript so that it doesn't cause a postback. Here's the code. Any help would be greatly appreciated. <asp:RadioButtonList ID="rbl1" runat="server" onClick="changed(this);" > <asp:ListItem Value="Yes">Yes</asp:ListItem> <asp:ListItem Value="No">No</asp:ListItem> <asp:Panel ID="panel1" runat="server"> <--other controls here --> </asp:Panel> function changed(rbl) { //not sure what to put in here } Thanks in advance, Zaps

    Read the article

  • DropDownList always does full-page postback, the first time it fires.

    - by CodexArcanum
    I have an ASP.NET page using the AJAX library. There is a dropdownlist inside an UpdatePanel, which on index changing is supposed to update a different UpdatePanel to modify a grid control. But after the page first comes up, and you adjust the ddl, the entire page postbacks, followed by a (correct) partial postback. After this one time, every other usage of the ddl performs correctly, trigger partial postbacks. Both the panel and the ddl are being added from code. The UP is Conditional updates and ChildrenAsTriggers = true. The dropdownlist is AutoPostBack true and has an event set up on SelectedIndexChanged. So what is going on? I've tried adjusting every setting I can think of and still the page completely refreshes once, then works fine after that.

    Read the article

  • How to use SqlDataSource for filling combobox as well as datatable or Dataset

    - by Shantanu Gupta
    I am trying to fetch a column value from a datasource when some value is selected from a dropdownlist on its change event. <asp:DropDownList ID="ddlCityName" runat="server" DataSourceID="dsCity" DataTextField="CityName" DataValueField="CityID" AutoPostBack="True" OnTextChanged="CityName_OnTextChanged"> </asp:DropDownList> <asp:SqlDataSource ID="dsCity" runat="server" ConnectionString="<%$ ConnectionStrings:GmapConnectionString %>" SelectCommand="SELECT * FROM [vcity]" ></asp:SqlDataSource> Here I want to fetch any other column's value that is not binded to a ddlCityName from sqldatasource. I have four columns in datasource i.e. name, id, address, phno. I want to fetch an address of a person who selects some value from ddl.

    Read the article

  • selected index event is not working in dropdown

    - by prince23
    <asp:DropDownList ID="ddlTime" runat="server" CausesValidation="true" AutoPostBack="true" onselectedindexchanged="ddlTime_SelectedIndexChanged"> <asp:ListItem Selected Value = "True">--Select--</asp:ListItem> <asp:ListItem>8.50</asp:ListItem> <asp:ListItem>9.00</asp:ListItem> <asp:ListItem>9.50</asp:ListItem> </asp:DropDownList> I have drop down with the event changing . but when ever i select an value this event is not firing at all protected void ddlTime_SelectedIndexChanged(object sender, EventArgs e) { } What is the issue that is causing here any help would be great thank you

    Read the article

  • populating a gridview with a button's click event

    - by david padi
    hi I have a page that has two dropdownlists(one for the locations, and the other for departments), an employee search textbox and a button. On the other page, I have a gridview. Now, what i want to archieve is that when a user types an employee's name in the textbox control, selects a location from the location dropdownlist, and a department from the departments dropdownlist, and click the button(search), the gridview on the other page must show the reqiured information of a SINGLE employee. Only one row must show. I have created a database for the employees. I know how to do this with the autopostback but i have not tried it using a button's click. NB: the gridview should show only one row of a selected employee. I'm using ASP.NET VB Your help will high apprecaited.

    Read the article

  • dropdown list event is not firing when javascript is used

    - by user1511953
    i have a problem in firing dropdownlist event i have following dropdown asp:dropdownlist id="ddlhello" Runat="server" AutoPostBack="True" onchange="javascript:return ChangeHeader();" i have also added event in code behind i.e. selectedindex change event. Now problem occurs when i execute the page, it executes javascript but server side code doesnot fire, but if i remove this line onchange="javascript:return ChangeHeader();" then server side code fires. when i checked source page it shows me two onchange events associated one for javascript and other for server side. i think that it is picking client side code and neglects server side. I am not pretty sure, so i want to know the behavior reason. And what is the way out for this. i want server and client side code to be executed. i have searched for solutions but i have not found any correct reason. please reply for the same. Thanks in advance

    Read the article

< Previous Page | 1 2 3 4 5 6 7  | Next Page >