Advertisement

08.06.2008 at 07:44AM PDT, ID: 23625859 | Points: 500
[x]
Attachment Details

Web Form Instance

Asked by ShantellH in WebApplications, Miscellaneous Web Development

Hi All

I saw many code samples on the net that creates instances of web forms, yet I can't seem to do this in VS 2005. What I mean is:

If I have a web form called form1, why does the code:

form1 f = new form1();

give "The type or namespace name 'form1' could not be found (are you missing a using directive or an assembly reference?)"?

I initially needed this to pass data between pages (which I now do using cross page postback) but I would still like to know why this doesn't seem possible.

Kind regards
Conrad PienaarStart Free Trial
[+][-]08.07.2008 at 12:22PM PDT, ID: 22184353

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.08.2008 at 12:24AM PDT, ID: 22188032

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-44 / EE_QW_2_20070628