Problem in creating dll

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cmrhema
    Contributor
    • Jan 2007
    • 375

    Problem in creating dll

    Hello

    I have created a small asp.net application wherein I just called a class
    Code:
    namespace dllconversion 
    {
    
    public partial class _Default : System.Web.UI.Page
    
    {
    
     
    
    protected void Page_Load(object sender, EventArgs e) 
    {
    
     
    
     
    
    }
    
    public class c1
    
    {
    
    public string abc(string a1) 
    {
    
     
    
    return a1+"ok"; 
    }
    
    }
    
    
    
     
    
    }
    }
    Here I just added the namespace and created a dll .

    Imported this dll to another page successfully.

    Now I just modified the dll a bit

    I haved added a button and textbox
    Code:
    namespace dllconversion 
    {
    
    public partial class _Default : System.Web.UI.Page
    
    {
    
     
    
    protected void Page_Load(object sender, EventArgs e) 
    {
    
     
    
     
    
    } 
    public class c1
    
    {
    
    public string abc(string a1) 
    {
    
     
    
    return a1+"ok"; 
    }
    
    }
    
    protected void Button1_Click(object sender, EventArgs e) 
    {
    
    TextBox1.Text = "button event"; 
    }
    
    }
    
     
    
     
    
    }
    Now when I create the dll in the command prompt

    Code:
    E:\Converttodll>csc /t:library default.aspx.cs
    I have the error as


    Default.aspx.cs (35,13): error CS0103: The name 'TextBox1' does not exist in the current context

    Please let me know what's the problem

    Regards

    cmrhema
Working...