ASP.NET Code to work on multiple browsers

Posted by Srinathgb under ASP.NET on 7/6/2013 | Points: 10 | Views : 737 | Status : [Member] | Replies : 1
Dear Team

Can you pl. share me the best practices to support multiple browsers while writing source code in ASP.NET?



Posted by: Jitendrasoft09 on: 7/7/2013 [Member] [MVP] Starter | Points: 25

Hi Srinath,
As your visual studio 2012 supports multiple browser capabilities. You have to create script which is mentioned in below-

<script runat="server">

private string _browser;
protected void Page_PreInit(object sender, EventArgs e)
{_browser = InfosoftBrowserInfo.BrowserJavaScript;}
protected void Page_Load(object sender, EventArgs e)
{ Button1.Attributes.Add("onclick", _browser);}

For more refer below link

Jitendra Kumar
If my post helps you, plz mark as an answer.

Srinathgb, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response