Hi Every one
i am trying to create three tier application for that i add three class library from the main menu file->add->New Project->class library i write the code for set and get the value from the web form but when i try to give the reference to main project to use this code i did not find any dll file of that project in add reference dialog box please can you help me to do this correctly
thanks in advanced
Loading
Master BillaPosted Aug 11, 2009, 4:51 AM
This is easy man, you mad a small mistake,
using System.Web.UI.HtmlControls;
using System.Net;
using System.Net.Mail;
using InfoLayer;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void btn_Click(object sender, EventArgs e)
{
InfoLayer. i am not getting any class to create obj
}
}
and this is my DefaultInfo.cs class
using System;
using System.Collections.Generic;
using System.Text;
namespace InfoLayer
{
public class DefaultInfo
{
private string _Txt;
public string Txt
{
get { return _Txt; }
set { _Txt = value; }
}
}
}
Make your class public and compile again and use in web application,.
Thank you :)
Master BillaPosted Aug 11, 2009, 6:00 AM
mohdazeemuddin ahmedPosted Aug 11, 2009, 5:29 AM
mohdazeemuddin ahmedPosted Aug 11, 2009, 3:57 AM
using System.Web.UI.HtmlControls;
using System.Net;
using System.Net.Mail;
using InfoLayer;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void btn_Click(object sender, EventArgs e)
{
InfoLayer. i am not getting any class to create obj
}
}
and this is my DefaultInfo.cs class
using System;
using System.Collections.Generic;
using System.Text;
namespace InfoLayer
{
class DefaultInfo
{
private string _Txt;
public string Txt
{
get { return _Txt; }
set { _Txt = value; }
}
}
}
Master BillaPosted Aug 11, 2009, 3:49 AM
Ohh could send you code here?
thank you
mohdazeemuddin ahmedPosted Aug 11, 2009, 3:42 AM
Master BillaPosted Aug 11, 2009, 2:30 AM
i think you have created Web Application Project.so when you are add reference sometimes it won't take. we faced thus issues many times,
Just close the application and open, then clean solution, and rebuild again.
The add what you did earlier it will show,and then you can refer that name space.
Thank you
mohdazeemuddin ahmedPosted Aug 11, 2009, 1:49 AM
i right click on project in solution explorer then i click add reference then i click project tab there i see all the class library name so i select the class library then click add button then i open default.aspx.cs file and use using keyword i can use that class library then when i try to create object of that which is present on that class library then i did not find any class inside that namespace mean when i write the name space like InfoLayer.DefaultInfo when i put . then intelligence of vs did not show me the class where i did mistake i am not getting
ArshadPosted Aug 10, 2009, 10:41 AM
(1- Give the output path of class library to the bin folder of asp.net application. then use the USING keyword. eg- Using Class Library
(2- you need to add the reference from asp.net application to the class library, so after that it will be add the dll in asp.net application with the .pdb and .refresh file.
while development if you are making any changes in the Class Library then .refresh file will automatically update those reference to the asp.net application.
Use the Second one.
Regards
Arshad.