webusercontrol

Last post 05-07-2008 4:04 AM by Thomas Sun – MSFT. 4 replies.

Sort Posts:

  • webusercontrol

    05-05-2008, 3:10 AM

     hi  all,

    how can i add this type of file in classlibrary 

    for example:

    1.webusercontrol.ascx

        1.1webusercontrol.ascx.cs

        1.2webusercontrol.ascx.resx

    this is like root node type pls understood  

         

  • Re: webusercontrol

    05-05-2008, 5:11 AM
    • Loading...
    • johram
    • Joined on 06-13-2006, 6:36 AM
    • Sweden
    • Posts 1,865
    • Moderator

    User controls (ascx) cannot be placed in class library, only in web application. You need to build a custom control. See Walkthrough: Developing and Using a Custom Server Control

    If this post was useful to you, please mark it as answer. Thank you!
  • Re: webusercontrol

    05-05-2008, 5:11 AM
    • Loading...
    • murthysrn
    • Joined on 12-15-2006, 5:22 AM
    • Bangalore
    • Posts 154

    build the executing class file  as dll and include that dll in the final,display pages(ascx,ascx.resx) etc.

     

     

     

    Thanks & Regards,
    Murthy.
  • Re: webusercontrol

    05-05-2008, 5:25 AM

     hi Murthy ,

     Thank u for ur reply,

    actually i am using DotNetNuke, i am finished my module , . i want to convert PrivateAssembly(PA) file.
    before create  a PA file, first i want module dll then convert a PA.

    tat means , exe  to dll goes to PA
    now i have error in exe file , so idont know how to correct this error,
    Error    1:    The name 'ctlAudit' does not exist in the current context   

    this is my .ascx file:
    <%@ Register TagPrefix="dnn" TagName="Audit" src="~/controls/ModuleAuditControl.ascx" Namespace="DyFlash"%>
    <dnn:Audit ID="ctlAudit" runat="server" />

    this is my .ascx.cs file:
     if (objDyFlash != null)
                            {
                                ctlAudit.CreatedByUser = objDyFlash.CreatedByUser.ToString();
                                ctlAudit.CreatedDate = objDyFlash.CreatedDate.ToString();
                            }

    pls tell how to correct this error



     

  • Re: webusercontrol

    05-07-2008, 4:04 AM
    Answer

    Hi,

    Please refer to your post http://forums.asp.net/t/1256124.aspx

     

    I hope this helps.

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
Page 1 of 1 (5 items)