that I put RFvare.visible=false and RfcareaC.visible=true
and 1 dropdown list below is my code:
<div id="zirbanaval"> <asp:RequiredFieldValidator ID="Rfvarea" runat="server" ErrorMessage="*لطفا مساحت زمین را وارد نمایید." ControlToValidate="txtarea" CssClass="RfvareaC" Visible="false"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RfvareC" runat="server" ErrorMessage="*لطفا زیر بنا را وارد نمایید" ControlToValidate="txtMesure" CssClass="RfvareabanaC"></asp:RequiredFieldValidator> </div>
I want if users select item="Area" from dropdownlist then Rfvare.visible=true and RfvareaC.visible= false
i want the code to disable default selection in dropdownlist in asp.net and also on selection of a particular data field the values are displayed in the txtbox below.the dropdown should be filled with system related data like eg c:drive, d ... etc dynamically at run time.
I have a dynamically generated dropdownlist, that lists e.g. Company Names. I want to be able to select a particular Company and display associated information e.g. Name, Address, City, State... etc. in text boxes adjacent to the list.
I am trying to fire the following code from the dropdownlist "OnSelectedIndexChanged" property, but cannot 1) get the code to fire upon selection, and 2) populate the text boxes...
I would like the user to select an item from a drop down list. Next to the drop down is a textbox or label control. From the ddl selection I would like to populate the textbox or label from a database with a corresponding field from the database the dropdownlist was populated from. On selectindexchange event I can populate the textbox with the Unique id from the value, but I need to input a different field into the textbox. Can I use some sort of variable to assign the Textbox.Text = ?
<asp:DropDownList runat="server" ID="DDLSalesPerson" DataValueField="keyid" DataTextField="FullName" /> <asp:TextBox runat="server" id="txtSalesPerson" /> My DDL is populated from SQL in the code-behind page.
How do I validate RequiredFieldValidator/CompareValidator conditionally. I have aded equiredFieldValidator/CompareValidator on date textbox. I want that if textbox1="No" thne it should not validate or compare date text box, if textbox1="Yes" then it should validate.
Is this possible on form submit button or any other way?
I'm using a gridview rows, in that I'm adding the rows. I need to disable the textboxes based upon the selected value from the dropdownlist (Yes / No). This should be remain same for the previous rows when ever I'm adding new rows.
I've recently finished building one of my first websites (and CMS) in ASP.NET but have came across a problem where a RequiredFieldValidator isn't working as it should do? I originally created the admin page to not require the RequiredFieldValidator, but now that I do need it the page won't acknowledge it's there. I have even set the field in the database to not accept nulls, but the query will still insert a null value into the database (SQL Server 2008 Express).
The TextBox that I'm referring to is "txtSectionTitle"
I'm looking to disable my requiredfieldvalidator when I have a my outer div's display set to none. I'm using this to toggle billing and shipping panels on the client side using jquery by removing them from view without a page refresh.
I have 2 dropdownlist, one is to dropdown department, and another dropdown staffnames. the secong dropdownlist will based on the selection of department as each department has different staffs i have 2 tables department and staff in my database , in my department table i have departmentid as PK and departmentname, in my staff table i have staffname and departmentid as FK. So my ques is how am i going to populate staffname in the dropdownlist according to the selection of department.
I have one table which contains branch codes(primary key), Branch name and bank name columns. I have 3 dropdownlist boxes. the first dropdownlist is for the branch codes. When i select the a branch code i need the second dropdownlist box to populate with the appropriate branch name and the third dropdownlist box to populate the bank name at the same time.
Is it possible to have one table like mine and acheive this, if so how do i go about doing this?
I did read up on this but only came across ones with 3 tables.