473,405 Members | 2,171 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Non-existent datagrid?

On a brand new aspx page I dragged a table from my local SQLServer in the
'Server Explorer' and it created the SqlConnection1 and SqlDataAdapter1. I
then used 'Generate Dataset' to create a simple dataset.

I created a datagrid and set its DataSource to 'DataSet11' and its
DataMember to 'TblEvents' (the name of the table). In the page designer it
correctly shows the column names from this table.

In the Page_Load I have

SqlDataAdapter1.Fill(DataSet11)

which matches the names of my objects. When I run this I see (from a SQL
trace) that it is querying the db, however, the page is blank and when I
look at the html source its basically 'empty'.

Yes, there is data in the table, and I can even see this data from within
the Server Explorer.

Any ideas what might be the problem? I've repeated this a few times, and
still can't get it to work (same with other data-bound controls)

Thanks, Paul.
Nov 18 '05 #1
2 873
Paul, I am not a big fan of this technique, and therefore only have
limited experience with it, but IIRC you need to do a Page.DataBind()
call after the SqlDataAdapter1.Fill(...) line.

hth

--

Scott Mitchell
mi******@4guysfromrolla.com
http://www.4GuysFromRolla.com
http://www.ASPMessageboard.com
http://www.ASPFAQs.com

* When you think ASP, think 4GuysFromRolla.com!
Nov 18 '05 #2
Hi - do you mean you prefer to declare everything in code? Can you give me
some reasons (security, etc.)?

Thanks

Paul.

"Scott Mitchell [MVP]" <mi******@4guysfromrolla.com> wrote in message
news:zG****************@newssvr13.news.prodigy.com ...
Paul, I am not a big fan of this technique, and therefore only have
limited experience with it, but IIRC you need to do a Page.DataBind() call
after the SqlDataAdapter1.Fill(...) line.

hth

--

Scott Mitchell
mi******@4guysfromrolla.com
http://www.4GuysFromRolla.com
http://www.ASPMessageboard.com
http://www.ASPFAQs.com

* When you think ASP, think 4GuysFromRolla.com!

Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: klaus triendl | last post by:
hi, recently i discovered a memory leak in our code; after some investigation i could reduce it to the following problem: return objects of functions are handled as temporary objects, hence...
3
by: Mario | last post by:
Hello, I couldn't find a solution to the following problem (tried google and dejanews), maybe I'm using the wrong keywords? Is there a way to open a file (a linux fifo pipe actually) in...
32
by: Adrian Herscu | last post by:
Hi all, In which circumstances it is appropriate to declare methods as non-virtual? Thanx, Adrian.
8
by: Bern McCarty | last post by:
Is it at all possible to leverage mixed-mode assemblies from AppDomains other than the default AppDomain? Is there any means at all of doing this? Mixed-mode is incredibly convenient, but if I...
399
by: =?UTF-8?B?Ik1hcnRpbiB2LiBMw7Z3aXMi?= | last post by:
PEP 1 specifies that PEP authors need to collect feedback from the community. As the author of PEP 3131, I'd like to encourage comments to the PEP included below, either here (comp.lang.python), or...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.