-
Start an .aspx object in C# classes
Hi All!
I created an object of page type like:
Page myPage = new anonym(); // which anonym is an anonym.aspx page
know wich I want is:
1. access myPage variables.
2. start (browse) this object in a browser.
thanks for your help.
-
I don't understand what you're trying to do. Usually, the code-behind for an ASP.NET page executes when a user requests the page in a browser (e.g., http://servername/appname/anonym.aspx). This also displays the page in the user's browser.
Can you describe in more detail what you are trying to do?
Phil Weber
http://www.philweber.com
Please post questions to the forums, where others may benefit.
I do not offer free assistance by e-mail. Thank you!
-
no it is not the code behind.
suppose we have a class in C# and here we want to create an object of type .aspx. than after we created it we want to browse it. because Response.Redirect(....); doesn't work.
here is a simple example:
public class Newaspx
{
public Newaspx()
{
}
public void start()
{
Page df = new _Default();
((_Default)df).Lbl.Text = "hi";//this throws an exception
//here I'd like to browse it ??????????? 
Process def= new Process();
def.StartInfo.FileName = "df ";
}
}
-
Is this code a Windows Forms application running on the user's PC? Or a Web application running on a Web server?
Phil Weber
http://www.philweber.com
Please post questions to the forums, where others may benefit.
I do not offer free assistance by e-mail. Thank you!
-
-
that mean in an .aspx I create a new object of this class
than i call the start() method
-
The only ways I know how to transfer control from one page to another in an ASP.NET application are Response.Redirect and Server.Transfer.
Phil Weber
http://www.philweber.com
Please post questions to the forums, where others may benefit.
I do not offer free assistance by e-mail. Thank you!
Similar Threads
-
Replies: 26
Last Post: 12-01-2012, 04:12 AM
-
Replies: 3
Last Post: 02-02-2007, 03:47 PM
-
By scottish mike in forum .NET
Replies: 0
Last Post: 08-08-2002, 05:56 AM
-
By Derek Mooney in forum .NET
Replies: 94
Last Post: 10-29-2001, 08:44 PM
-
Replies: 0
Last Post: 05-01-2001, 02:46 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks