Home > DeveloperSection > Forums > HTML button in MasterPage
Chintoo Semi

Total Post:135

Posted on    August-25-2014 1:13 AM

 ASP.Net ASP.Net 

 1 Reply(s)
 851  View(s)
Rate this:

I have the following HTML in my MasterPage:

<input class="button" type="button" value="Select User" onclick='<%# string.Format(@"location.href={0}", ResolveUrl("~/SelectUser.aspx")) %>' />

I'm trying to figure out how to get ResolveUrl to work with an HTML input button,  I could use an ASP.NET Button, but then I'd have to chang my CSS and I really don't want to spend the time doing that.

Any help on how to go about doing this would be greatly appreciated.


Sumit Kesarwani

Total Post:378

Posted on    August-25-2014 2:13 AM

Hi Chintoo, 

I use href like below and make sure that there is no runat="server" tag.

    href = "<%=this.ResolveUrl("~/abc.aspx")%>"

Don't want to miss updates? Please click the below button!

Follow MindStick