Greatings,
How I can open a web page from my website on the C# code, for example in a Onclick method of an button control, i used build web pages with JavaScript too Coldfusion with ActionScript. Javascript and ActionScript have "getURL()" function, and Coldfusion has "cflocation" tag:
Javascript and ActionScript:
getURL("Page1.html");
Coldfusion:
<cflocation url="Page1.cfm">
I have Visual Studio 2008
-------------------------------------------
I'm trying to navigate to a new webpage using a button click. I used RegisterClientScriptBlock method that Christian Graus suggest, Thanks very much, but the getURL() function not work:
protected void Button1_Click(object sender, EventArgs e)
{
ClientScriptManager myClientScriptManager = Page.ClientScript;
myClientScriptManager.RegisterClientScriptBlock(this.GetType(), "Script1", "getURL('Page1.aspx');", true);
}
----------------------------------------
Upsss!! so sorry, yes getURL is from ActionScript and window.open from JavaScript, I was confused. Thanks Christian Graus, my code work so:
protected void Button1_Click(object sender, EventArgs e)
{
ClientScriptManager myClientScriptManager = Page.ClientScript;
myClientScriptManager.RegisterClientScriptBlock(this.GetType(), "Script1", "window.open('Page1.aspx', '_top');", true);
}
Thanks Very much for your help:thumbsup::thumbsup::thumbsup: