Last post May 02, 2013 06:38 PM by thirumaran007
Member
7 Points
61 Posts
May 02, 2013 04:07 PM|maliksh|LINK
How to change Master page direction from left to right when press buttonA, and from left ot right when press button B
here the buttons code
protected void RequestLanguageChange_Click(object sender, EventArgs e) { LinkButton senderLink = sender as LinkButton;
if (Session["LangID"].ToString() != senderLink.CommandArgument) { Session["LangID"] = senderLink.CommandArgument;
HttpContext.Current.Server.Transfer(Request.Url.AbsolutePath); Server.Transfer(Request.Url.LocalPath); }
}
on page load
if
MasterBody.Attributes.Add("float", "right"); MasterBody.Attributes.Add("dir", "rtl");
the code work fine , but when login and then logOut and change language then the error
Error executing child request for /Account/Login. because of Server.Transfer(Request.Url.LocalPath);
All-Star
35149 Points
9075 Posts
May 02, 2013 05:58 PM|smirnov|LINK
Instead of Server.Transfer() you can try to use
HttpContext.Current.RewritePath("somefile.aspx");
Contributor
4954 Points
1726 Posts
May 02, 2013 06:38 PM|thirumaran007|LINK
Try with response.redirect, as mentioned MSDN http://support.microsoft.com/kb/320439
Member
7 Points
61 Posts
How to change Master page direction from left to right
May 02, 2013 04:07 PM|maliksh|LINK
How to change Master page direction from left to right when press buttonA, and from left ot right when press button B
here the buttons code
protected void RequestLanguageChange_Click(object sender, EventArgs e)
{
LinkButton senderLink = sender as LinkButton;
if (Session["LangID"].ToString() != senderLink.CommandArgument)
{
Session["LangID"] = senderLink.CommandArgument;
HttpContext.Current.Server.Transfer(Request.Url.AbsolutePath);
Server.Transfer(Request.Url.LocalPath);
}
}
on page load
if
MasterBody.Attributes.Add("float", "right");
MasterBody.Attributes.Add("dir", "rtl");
the code work fine , but when login and then logOut and change language then the error
Error executing child request for /Account/Login. because of
Server.Transfer(Request.Url.LocalPath);
All-Star
35149 Points
9075 Posts
Re: How to change Master page direction from left to right
May 02, 2013 05:58 PM|smirnov|LINK
Instead of Server.Transfer() you can try to use
HttpContext.Current.RewritePath("somefile.aspx");
Contributor
4954 Points
1726 Posts
Re: How to change Master page direction from left to right
May 02, 2013 06:38 PM|thirumaran007|LINK
Try with response.redirect, as mentioned MSDN http://support.microsoft.com/kb/320439
With Friendly,
Thirumaran