I have created a small asp.net application wherein I just called a class
Expand|Select|Wrap|Line Numbers
- 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";
- }
- }
- }
- }
Imported this dll to another page successfully.
Now I just modified the dll a bit
I haved added a button and textbox
Expand|Select|Wrap|Line Numbers
- 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";
- }
- }
- }
Expand|Select|Wrap|Line Numbers
- E:\Converttodll>csc /t:library default.aspx.cs
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