c# - Adding Hyperlinks to ValidationSummary -


i have long form users fill out. there way hyperlink error message in validationsummary specific text field?

the easiest way straightforward html anchor tags <a>, can include html in errormessage property of validation control displayed in validationsummary control. examples

<asp:validationsummary id="validationsummary1" runat="server" /> <asp:button id="button5" runat="server" text="submit" /> <br /> <div style="height:800px"></div> <a name="textbox1"></a> required field <asp:textbox id="textbox1" runat="server" /> <asp:requiredfieldvalidator id="requiredfieldvalidator1" runat="server"      errormessage="required field required <a href='#textbox1'>click here go to</a>"      text="***"      controltovalidate="textbox1" /> 

a more elegant approach combine above approach jquery using scrollto function , perhaps highlighting field. can include jquery/javascript code in onclick property of anchor tag.


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -