TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
syed maricar
NA
3
0
location.Replace
Dec 28 2005 12:22 AM
Hi,
Location.Replace("URL") is not working for server controls like <asp:button>.
Here is my code.
protected void _btn2_Click(object sender, System.EventArgs e)
{
string URL="http://forums.csharpcorner.com/AddPost.aspx?TSource=AddPost";
string func="";
func += "<script language='javascript'>";
func += "window.location.replace('" + URL+ "','X');";
func += "</script>";
if(!IsClientScriptBlockRegistered("window.location.replace"))
{
Page.RegisterClientScriptBlock("window.location.replace", func);
}
}
It is redirecting to the new location, but the "Back" button in the browser is getting enabled.
I dont want this button to be enabled.
But the same location.replace("URL") is working for HTML buttons.
How we can make it possible in Server controls??
Any idea?
Regards,
Syed.
Reply
Answers (
0
)
How to execute a custom file with C#?
Developing a Chat Application using C# in ASP.Net