Redirect to Page

Add-in Express™ Support Service
That's what is more important than anything else

Redirect to Page
 
Rogfer Jaimes




Posts: 2
Joined: 2011-02-23
Hi My name is Roger, please i need information how can i redirect to URL after the press a Form Button

Example
In Asp

if(true)
Response.Redirect("www.mysite.com"); --> how can i do this with this componet


Thank you
Posted 23 Feb, 2011 01:07:52 Top
Sergey Grischenko


Add-in Express team


Posts: 7202
Joined: 2004-07-05
Hi Rogfer,

To redirect the browser to another Url you need to use BeforeNavigate2 event of the iemodule.
Posted 24 Feb, 2011 09:34:31 Top
Rogfer Jaimes




Posts: 2
Joined: 2011-02-23
Hi thank you for respond, please can you put an example
Posted 24 Feb, 2011 10:20:56 Top
Sergey Grischenko


Add-in Express team


Posts: 7202
Joined: 2004-07-05
Here you go.

private void IEModule_BeforeNavigate2(AddinExpress.IE.ADXIEBeforeNavigate2EventArgs e)
{
string url = (string)e.Url;
if ((!String.IsNullOrEmpty(url)) && (e.PDisp is IE.IWebBrowser2))
{
if (url.IndexOf("www.google.") >= 0)
{
(e.PDisp as IE.IWebBrowser2).Stop();

object dummy = null;
IEApp.Navigate("http://www.yahoo.com/", ref dummy, ref dummy, ref dummy, ref dummy);
}
}
}
Posted 25 Feb, 2011 08:37:54 Top