ok here's the thing... You fetch user's IP address and based on his/her country you redirect the user to a specific webpage..Now how do you change the master page dynamically ? this is how I am redirecting the user :-
its not like user clicks some button or something and u then change the master page..i want it changed when user is redirected so what I wanna know is what how exactly do I go about it..
public partial class testClass: System.Web.UI.MasterPage
{
protected void Page_Load(object sender, EventArgs e)
{
if(redirected to site1)
{
Use this master page1
}
else
if(redirected to site2)
{
Use this master page2
}
}
}
So how do I like check that what SITE user has been redirected to ?? Also HOW to apply the specific master page now that the user has been redirected ??
I just need an idea how to go about it..thnx
[EDIT] plz check the code block below...how do i fetch the URL that the user has been redirected to ?? I actually need just the "iso3166TwoLetterCode" variable's value(see the link to my earlier ques plz) and based on that will be changing the master page...I cant figure out how to fetch that value or even use that class (that's got this variable) in my testClass
protected void Page_PreInit(object sender, EventArgs e)
{
if(user Has been redirected to www.site.in )
{
this.MasterPageFile = "master1.master";
}
if(user Has been redirected to www.site.fr )
{
this.MasterPageFile = "master2.master";
}
}