I would like to create a button that allow to open html page.
-
Excuse-me for my stupid question, In WebForm, I would like to create a button that allow to open html page.(link with parameter ex: qsdf.asp?Text=tete) in the same browser (and other browser). How can I do that?:confused: -=zoltx=-
In your event handler for your Button you can Response.Write your javascript code to load a new window and change the location of your current browser. This gives you a dynamic effect. js references
window.open, href.location
example:public void OnClickButton1(object sender, EventArgs e){ Response.Write("<javascript>window.open("www.codeproject.com");</javascript> ); }
Note: code was written from memory, it is meant only for a guide
R.Bischoff | C++ .NET, Kommst du mit?
-
In your event handler for your Button you can Response.Write your javascript code to load a new window and change the location of your current browser. This gives you a dynamic effect. js references
window.open, href.location
example:public void OnClickButton1(object sender, EventArgs e){ Response.Write("<javascript>window.open("www.codeproject.com");</javascript> ); }
Note: code was written from memory, it is meant only for a guide
R.Bischoff | C++ .NET, Kommst du mit?
Sorry I tested and you code don't work, I modify your in this manner Response.Write("window.open(\"www.codeproject.com\"); ")"); but it is not enough.. -=zoltx=-
-
In your event handler for your Button you can Response.Write your javascript code to load a new window and change the location of your current browser. This gives you a dynamic effect. js references
window.open, href.location
example:public void OnClickButton1(object sender, EventArgs e){ Response.Write("<javascript>window.open("www.codeproject.com");</javascript> ); }
Note: code was written from memory, it is meant only for a guide
R.Bischoff | C++ .NET, Kommst du mit?