Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Building Controls / April 2006

Tip: Looking for answers? Try searching our database.

VS 2005 & Web User Controls

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Alex Maghen - 18 Apr 2006 23:03 GMT
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
Steven Cheng[MSFT] - 19 Apr 2006 04:58 GMT
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.
Alex Maghen - 19 Apr 2006 15:38 GMT
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

> Hi Alex,
>
[quoted text clipped - 40 lines]
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
Steven Cheng[MSFT] - 19 Apr 2006 16:04 GMT
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.

Signature

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

Steven Cheng[MSFT] - 21 Apr 2006 14:53 GMT
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.

Signature

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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.