Click here to Skip to main content
15,891,704 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i am using messagebox.show("")
in my web appl
and as reference i have used using System.Windows.Forms;
but when i run the app results this error:
Compiler Error Message: CS0234: The type or namespace name 'Windows' does not exist in the namespace 'System' (are you missing an assembly reference?)
What reference should i use?
Posted

If you would like to use the components and controls which are defined in the namespace "System.Windows.Forms", you need to add a reference to it by right mouse clicking the project in the solution explorer and choosing "Add Reference" in the context menu -> Tab "Net" -> "System.Windows.Forms".

For more details refer MSDN[^]
 
Share this answer
 
Comments
lovitaxxxx 6-Dec-12 8:41am    
i did it this way.. but still gives me the error:/
Prasad_Kulkarni 6-Dec-12 8:45am    
Refer this[^] similar answer, if you are compiling from command line.
Add System.Windows.Forms reference from right panel of your VS IDE.. and then use it :)
 
Share this answer
 
Comments
lovitaxxxx 6-Dec-12 8:34am    
it gives me still the same error :/
[no name] 6-Dec-12 8:38am    
Post your entire code :)
lovitaxxxx 6-Dec-12 8:43am    
to navigate to the next button of the datatable:
protected void Button1_Click(object sender, EventArgs e)
{

int rowIndex = 0;

if (Hidden_id.Value.Trim() != null)
{
rowIndex = Convert.ToInt32(Hidden_id.Value) + 1;



if (Session["dt"] != null)
{

DataTable dt = (DataTable)Session["dt"];

if (rowIndex < dt.Rows.Count)
{

//get the next row entry on Button Click by setting the Row Index
txt_kodi.Value = dt.Rows[rowIndex]["Code"].ToString();



txt_tel.Value = dt.Rows[rowIndex]["Tel"].ToString();

txt_mobile.Value = dt.Rows[rowIndex]["Mobile"].ToString();

Session["dt"] = dt;
Hidden_id.Value = rowIndex.ToString();



}
else

MessageBox.Show("Last record!");

}

}
}

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900