-----------------------------------------------------------

New Message on BDOTNET

-----------------------------------------------------------
From: PremAnand7
Message 3 in Discussion




  
    
    New Message on BDOTNET
  
  





      open IE from my ASP.Net application.

    
  
    
      Reply

          
            
                
               
                  Reply to Sender
                    Recommend
                  
                  Message 1 in Discussion
                                                
            
          
        
                    
        
            
              From: 
              PremAnand7
            
            
              

               <DIR> 
Hi,
I want to open IE from my ASP.Net application.The flow is :
AS my page loads,it gets the URL from the Database & using this URL an instance of IE 
is to be opened with the supplied URL. 
Also after opening this URL my application is to also redirect itself to anopther page 
in the application.
My HTML code & code behind i hasve attached for better understanding
Plz help.
Thanx in advance
Prem 
PS: hi pandurang (cognizant)tried getting in touch with u  but mail is bouncing back. 
  
code behind file: 
  
  
using System; 
using System.Collections; 
using System.ComponentModel; 
using System.Data; 
using System.Drawing; 
using System.Web; 
using System.Web.SessionState; 
using System.Web.UI; 
using System.Web.UI.WebControls; 
using System.Web.UI.HtmlControls; 
using SQLDatabase.Data; 
using System.Configuration; 
using System.Data.SqlClient; 
using System.Diagnostics; 
using SHDocVw; 
  
  
namespace Glow 
{ 
/// <summary> 
/// Summary description for Home. 
/// </summary> 
public class Home : System.Web.UI.Page 
{ 
public string constr=""; 
protected string pname="HO"; 
protected string strJs=""; 
protected DataBase DBase=new DataBase (); 
private void Page_Load(object sender, System.EventArgs e) 
{ 
// Put user code to initialize the page here 
constr=ConfigurationSettings.AppSettings["DSN"]; 
if(Session["userrights"]==null) 
{ 
Response.Redirect("trialuser.aspx"); 
} 
else 
{ 
string Chk=Session["userrights"].ToString(); 
string lvlCoID=Session["compid"].ToString(); 
string lvlSql="Select URL from Company where CompanyID='"+lvlCoID+"'"; 
SqlDataReader DR=DBase.getDataReader(lvlSql); 
try 
{ 
if(DR.Read()) 
{ 
// string lvlURL=DR.GetValue(0).ToString(); 
string lvlURL="http://www.Yahoo.com";; 
DR.Close();  
string lvlscript="<script language=Javascript>window.open(lvlURL);</script>"; 
RegisterStartupScript("PopupScript", lvlscript); 
// System.Diagnostics.Process.Start(lvlURL); 
// RegisterStartupScript("<script>window.open('" + lvlURL + "');</script>"); 
Response.Redirect("Welcome.aspx"); 
} 
} 
catch(Exception ex) 
{ 
DR.Close(); 
strJs="<script>alert('No Website For This Company');</script>"; 
RegisterClientScriptBlock("Error",strJs); 
Response.Redirect("Welcome.aspx"); 
} 
}  
} 
#region Web Form Designer generated code 
override protected void OnInit(EventArgs e) 
{ 
// 
// CODEGEN: This call is required by the ASP.NET Web Form Designer. 
// 
InitializeComponent(); 
base.OnInit(e); 
} 

/// <summary> 
/// Required method for Designer support - do not modify 
/// the contents of this method with the code editor. 
/// </summary> 
private void InitializeComponent() 
{  
this.Load += new System.EventHandler(this.Page_Load); 
} 
#endregion 
} 
} 
  
  
html code : 
 
<%@ Page language="c#" Codebehind="Home.aspx.cs" AutoEventWireup="false" 
Inherits="Glow.Home" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
 <HEAD>
  <title>Home</title>
  <meta content="Microsoft Visual Studio 7.0" name="GENERATOR">
  <meta content="C#" name="CODE_LANGUAGE">
  <meta content="JavaScript" name="vs_defaultClientScript">
  <meta content="http://schemas.microsoft.com/intellisense/ie5"; name="vs_targetSchema">
 </HEAD>
 <body MS_POSITIONING="GridLayout">
  <form id="Home" method="post" runat="server">
  </form>
 </body>
</HTML> 
  
  
  
<%@ Page language="c#" Codebehind="Home.aspx.cs" AutoEventWireup="false" 
Inherits="Glow.Home" %> <%@ Page language="c#" Codebehind="Home.aspx.cs" 
AutoEventWireup="false" Inherits="Glow.Home" %>  <META content="Microsoft Visual 
Studio 7.0" name=GENERATOR> <META content=C# name=CODE_LANGUAGE> <META 
content=JavaScript name=vs_defaultClientScript> <META 
content=http://schemas.microsoft.com/intellisense/ie5 name=vs_targetSchema> <FORM 
id=Home method=post runat="server"></FORM> <META content="Microsoft Visual Studio 7.0" 
name=GENERATOR> <META content=C# name=CODE_LANGUAGE> <META content=JavaScript 
name=vs_defaultClientScript> <META 
content=http://schemas.microsoft.com/intellisense/ie5 name=vs_targetSchema> <FORM 
id=Home method=post runat="server"></FORM> 
  
 </DIR>
          
        
      
          
  

    View other groups in this category.
  

  

      




-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/bdotnet/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to