Hello,
There a form having two text box, having a required field validator on second textbox, If it's empty i want to display message like, "<field1Name> can't be blank". Where <field1Name> is the value of first textbox on the form (i.e.fldszField1Value.Text)
How can i do that in <html> </html> section of .aspx file using <% %> ? is it possible to do so ? or will i have to put my code in .aspx.vb file ?
This is a pseudo code of a situation, i do have.
<tr>
<td>
<asp:TextBox ID="fldszField1Name" runat="server" MaxLength="50"></asp:TextBox>
</td>
<td>
<asp:TextBox ID="fldszField1Value" runat="server" MaxLength="50"></asp:TextBox>
<asp:RequiredFieldValidator ID="Requiredfieldvalidator1" runat="server" ControlToValidate="fldszField1Name" ErrorMessage= <%= fldszField1Name.Text & "can’t be blank" %> Display="None">Field can’t be blank</asp:RequiredFieldValidator></td>
</tr>