Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Problem with datalist

Posted on 2005-04-19
2
Medium Priority
?
255 Views
Last Modified: 2010-04-07
I'm converting an app written using the pure .net framework from command line, to Visual studio 2003. Having a problem with the datalist that wasnt there before:

e:\inetpub\wwwroot\WebApplication2\winelist.aspx.cs(38): The type or namespace name 'MyList' could not be found (are you missing a using directive or an assembly reference?)

MyList.DataSource = productlist.gettheitems(color, category, year, region, appellation, country);
MyList.DataBind();

What am I missing?

TIA
D
0
Comment
Question by:dprasad
2 Comments
 
LVL 12

Assisted Solution

by:laotzi2000
laotzi2000 earned 800 total points
ID: 13818109
You need to add a definition for MyList in your code behind.

System.Data.DataList MyList;
0
 
LVL 6

Accepted Solution

by:
dharmesh_amity earned 1200 total points
ID: 13818123
Check these things.

Where there is declaration of datalist in aspx page check here
<asp:datalist

There should be id assigned which should be  ID = "MyList"

there should be runat=server.

And in your class declaration in winelist.aspx.cs file

public class winelist: Page{
    //check for this
    protected DataList MyList;
}
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
The Relationships Diagram is a good way to get an overall view of what a database is keeping track of. It is also where relationships are defined. A relationship specifies how two tables connect to each other. As you build tables in Microsoft Ac…
Suggested Courses
Course of the Month14 days, 15 hours left to enroll

578 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question