Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to validate a hyperlink 1

Status
Not open for further replies.

compu66

Programmer
Dec 19, 2007
71
US
Hi all,

I have a hyperlink ,my requirement is if the hyperlink is not clicked then an error message should pop up.
all validations provided are for input control and this is hyperlinks.How to handle it.

Thanks.
 
I'm not sure why you are doing what you are doing, but how about using a link button?
 
no it navigates but if the user dont click on hyperlink and not select a category then we should show a msg to please select a catergory.
 
A link is the wrong type of element really. Users will probably expect this to go to another page without validation. However, you could use a LinkButton as jbenson001 suggests if you don't want to substitute this for a button.


-------------------------------------------------------

Mark,
[URL unfurl="true"]http://aspnetlibrary.com[/url]
[URL unfurl="true"]http://mdssolutions.co.uk[/url] - Delivering professional ASP.NET solutions
[URL unfurl="true"]http://weblogs.asp.net/marksmith[/url]
 
You could also do this client-side with javascript. See here for an example:





-------------------------------------------------------

Mark,
[URL unfurl="true"]http://aspnetlibrary.com[/url]
[URL unfurl="true"]http://mdssolutions.co.uk[/url] - Delivering professional ASP.NET solutions
[URL unfurl="true"]http://weblogs.asp.net/marksmith[/url]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top