View Complete Post
my question is very simple. I had read through many post include this: http://blog.anasghanem.com/post/How-to-get-the-readonly-textbox-value-on-the-server-.aspx
i have think to disable the requried field validtor at server side when data is inserted. Anyone know how?
I am trying to get the required field validator to work. I have given it an initial value of the first index value in the dropdown list. I is just not working. Will my
contrrols residing on a View of a Multiview control effect anything. I
am using all drop down lists?
How to use required field validator along with ajax toolkit editor control?
//This runs the function when the form first loads
//This locks the fields the users should not modify
var theInputTFTitle = getTagFromIdentifierAndTitle("Input","TextField","Title");
theInputTFTitle.readOnly = true;
theInputTFTitle.style.color = 'gray';
//alert(" Value: " + theInputTFTitle.value);//for testing
var theInputDDLReplyStatus = getTagFromIdentifierAndTitle("select","DropDownChoice","Reply Status");
theInputDDLReplyStatus.disabled = true;
//alert(" Value: " + theInputDDLReplyStatus.value);//for testing
I have the following markup:
<asp:TemplateField HeaderText="Name" SortExpression="Name"><ItemTemplate><asp:TextBox ID="txtName" runat="server" /><asp:RequiredFieldValidator ID="valName" runat="server"ErrorMessage="Name required." ControlToValidate="txtName"Text="*"></asp:RequiredFieldValidator></ItemTemplate></asp:TemplateField>
The Validator text appears on a new line immediately after the TextBox. I would like it to appear immediately after the TextBox (i.e. to the right of it).
I've tried two things to fix this:
1. I put the markup on the same line, e.g.:
<asp:TextBox ID="txtName" runat="server" /><asp:RequiredFieldValidator ... />
2. I tried putting the TextBox and Validator in the same html table cell.Both strategies failed. Any other ideas out there? I appreciate your help!