Hi,
You must have set the favicon on your master page like this:
<link id="favicon" rel="shortcut icon" type="image/png" href="favicon.png" />
You should be able to just pass the name of the icon you want along in the view data and throw it into the head tag. You can change the favicon for the respective page using Javascript by changing the HREF element on this link, for instance (assuming you're using JQuery):
$("#favicon").attr("href","favicon2.png");
Another way here could be, you can add favicon like this:
<link runat="server" rel="shortcut icon" href="" type="image/x-icon" />
<link runat="server" rel="icon" href="" type="image/ico" />
And in .aspx.cs :
protected void Page_Load(object sender, EventArgs e)
{
Link1.Attributes.Add("href", "favicon.ico");
Link1.Attributes.Add("href", "favicon.ico");
}
Check this out:
http://thelazybubble.blogspot.in/2011/08/add-dynamic-fevicon-to-your-websites-in.html[
^]
Hope this helps !! :) :)
Regards,
Praneet