HREF on Image

  • Thread starter Thread starter WJ
  • Start date Start date
W

WJ

I have an Image.Jpg on my asp.Net page, how to I implement the HREF so that
when I click on the image, the system will logon to a specified web site,
like that of Front Page.

Thanks

John
 
Use the ImageButton control. Double click on it in VS.NET and add the
following code:

Dim userName As String = "UserName"
FormsAuthentication.RedirectFromLoginPage(userName, false)
Then, set up the web.config to use the page as a logon:

<authentication mode="Forms" >
<forms name="CookieNameHere"
loginUrl="login.aspx">
</forms>
</authentication>


<authorization>
<deny users="?" /> <!-- Question All Users-->
</authorization>

You can link to a database to check the user, or put credentials in the
web.config (not recommended, but doable).

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************************************************
Think outside the box!
***************************************************************
 
Back
Top