Div server control not working in VS2002


T

tshad

I have some code that works at work but not at home.

I am using VS2002 at home and get the following error:


The type or namespace name 'div' could not be found (are you missing a using
directive or an assembly reference?)

My code behind page as:

*******************************************
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

namespace WebApplication4
{
/// <summary>
/// Summary description for WebForm1.
/// </summary>
public class WebForm1 : System.Web.UI.Page
{
protected div Message;
public void Page_Load(object sender, System.EventArgs e)
{
//we create the base class below:
Profile profile = new Profile();
********************************************************

In my aspx file I have:

<div id="Message" runat="server"></div>

What is causing the message?

Thanks,

Tom
 
Ad

Advertisements

T

tshad

Could be.

I did replace it with asp:label and it worked fine. Just couldn't figure
out why 2002 was giving me the error on Div.

Thanks,

Tom
 
Ad

Advertisements

B

Bruce Barker

these is no builtin "div" class in asp.net. div with a runat server are of
class HtmlGenericControl.

-- bruce (sqlwork.com)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top