VS 2005 & Web User Controls

A

Alex Maghen

Hi. When you create a Web User Control using VS.NET 2005, it creates
something that looks quite different from what was created in previous
versions. Is there a documetn anywhere that expalins specifically how ASCXs
have changed in this version?

Alex
 
S

Steven Cheng[MSFT]

Hi Alex,

Thank you for posting an glad to see you again:).

As for the ascx usercontrol, based on my understanding, there is no
particular changes specific the usercontrol itself. The changes on the ascx
usercontrol are consistent to the ASP.NET 2.0's webform page. You can have
a look at the following msdn reference on developing ASP.NET usercontrol:

#ASP.NET User Controls
http://msdn2.microsoft.com/en-us/library/y6wb1a0e(VS.80).aspx

And for main changes, for runtime, it utilize the dynamic compilation model
and partial class merge just like the ASPX page. Also, the usercontrol
class has provide some additional properties for .net framework 2.0, you
can view them in the MSDN reference to get the detailed description.

#Codebehind and Compilation in ASP.NET 2.0
http://msdn.microsoft.com/msdnmag/issues/06/01/ExtremeASPNET/

As for design-time changes, I think it is the design-time display mode in
VS 2005's page designview. In vs 2003, when we used an ascx usercontrol in
page, it can only be displayed as a gray box in designview, now in vs 2005,
the usercontrol referenced in aspx page can also be displayed as runtime
html when swtich to designview.

If there is anything else I didn't catched or if you have any other
concerns, please feel free to let me know.

Hope this helps.

Regards,

Steven Cheng
Microsoft Online Community Support


==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================


This posting is provided "AS IS" with no warranties, and confers no rights.
 
A

Alex Maghen

Steven -

Thanks for this. Very helpful. Let me just ask you another (related) question:

Is there a way, in the VS 2005 UI, to insert a User Control that you've
created somewhere else, into an ASPX? Or do you have to do it manually be
typing in the <@ REGISTER... tag at the top and then typing in the text of
the actual control tag in the body of the document?

Alex
 
S

Steven Cheng[MSFT]

Thanks for your response Alex,

As for the further question you mentioned:

=================================
Is there a way, in the VS 2005 UI, to insert a User Control that you've
created somewhere else, into an ASPX?
=================================

do you mean when the usercontrol and aspx page are in the same
project?(Anyway, the usercontrol is designed for reusable UI component in
single project, not cross mutiple projects). If so, you can directly
select the usercontrol in the "Solution Explorer", and then drag it into
the Page's webform in Design-view, and the IDE will help you create the
necessary directive and markup. Actually, this feature is available ever
since VS 2003.

Hope this also helps.

Regards,

Steven Cheng
Microsoft Online Community Support


==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================


This posting is provided "AS IS" with no warranties, and confers no rights.



Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
S

Steven Cheng[MSFT]

Hi Alex,

Does my further response also helps some? If you still have any question or
anything else we can help, please feel free to post here.

Regards,

Steven Cheng
Microsoft Online Community Support


==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================


This posting is provided "AS IS" with no warranties, and confers no rights.



Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top