473,508 Members | 2,441 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Using Extra Columns in SQLDataSource

I have controls (dropdown list, radiobutton list) that are bound to an
SQLDataSource. In the SELECT statement in the DataSource configuration I
have tried to include other columns that would be useful to do something
with (e.g. store in an object, textbox, etc.) besides just populating the
databound control.

Is there way to access these extra columns in a SQLDataSource or do I have
to forget the DataSource control, query the database and populate the
controls and other desired items "manually"?

Thanks for any tips.
Feb 7 '07 #1
2 1106
No need to populate the controls manually. When your task grows over the
typical and trivial, abandon the declarative databinding and go for the old
good DataSource property (as opposed to DataSourceID). Create a dataset,
populate the datatable and databind to it.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"Don Miller" <no****@nospam.comwrote in message
news:ue****************@TK2MSFTNGP06.phx.gbl...
>I have controls (dropdown list, radiobutton list) that are bound to an
SQLDataSource. In the SELECT statement in the DataSource configuration I
have tried to include other columns that would be useful to do something
with (e.g. store in an object, textbox, etc.) besides just populating the
databound control.

Is there way to access these extra columns in a SQLDataSource or do I have
to forget the DataSource control, query the database and populate the
controls and other desired items "manually"?

Thanks for any tips.

Feb 8 '07 #2
Thanks. It took me awhile to find the available properties for a control
(like DataSource) since most don't show up in the Design view but they are
all there in Source view.

"Eliyahu Goldin" <RE**************************@mMvVpPsS.orgwrote in
message news:uW*************@TK2MSFTNGP05.phx.gbl...
No need to populate the controls manually. When your task grows over the
typical and trivial, abandon the declarative databinding and go for the
old good DataSource property (as opposed to DataSourceID). Create a
dataset, populate the datatable and databind to it.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"Don Miller" <no****@nospam.comwrote in message
news:ue****************@TK2MSFTNGP06.phx.gbl...
>>I have controls (dropdown list, radiobutton list) that are bound to an
SQLDataSource. In the SELECT statement in the DataSource configuration I
have tried to include other columns that would be useful to do something
with (e.g. store in an object, textbox, etc.) besides just populating the
databound control.

Is there way to access these extra columns in a SQLDataSource or do I
have to forget the DataSource control, query the database and populate
the controls and other desired items "manually"?

Thanks for any tips.


Feb 8 '07 #3

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

Similar topics

3
6026
by: sck10 | last post by:
Hello, I am creating a form for users to enter information about a lab and the members of the lab. I have one form (FormView) that they use to enter information about that lab. The keyvalue is...
0
2178
by: Metal2You | last post by:
I'm working on an ASP.NET 2.0 application in Visual Studio 2005 that accesses a Sybase database back end. We're using Sybase SQL Anywhere 9.0.2.3228. I have installed and registered the Sybase...
3
8915
by: Wayne Wengert | last post by:
Using VSNET2005. I want to insert some rows into a table. Each row has 2 columns, "memberid" which is a GUID and "Interests" which is a varchar. I created a SQLDataSource with the values to insert...
7
4337
by: Lorenzino | last post by:
Hi, I have a problem with bindings in a formview. I have a formview; in the insert template i've created a wizard control and inside it i have an HTML table with some textboxes bound to the...
0
1501
by: jobs | last post by:
I have a gridview that I use to both select a record to be edited in a formview and to also delete records with. Because the selectcommand is grouping rows, my deletes stored procedure requires a...
0
2735
by: joebob8000 | last post by:
This seems like a simple task, but my 6 year old roots in classic ASP must be causing me trouble with my current problem. I am looking to provide a search for users in which they can select...
1
6112
by: sheenaa | last post by:
Hello Members, I m creating my application forms in ASP.Net 2005 C# using the backend SQL Server 2005. What i have used on forms :: ? On my first form i have used some...
0
2207
by: lamolap | last post by:
i have 1 gridview , a dropdownlist inside a gridview and a commandfield of (edit, update and cancel) my gidview looks like this Edit Surname Initials ...
1
1156
by: sweatha | last post by:
Hi I connected SQLDataSource in GridView by using coding <asp:GridView ID="Search_GridView" runat="server" Style="z-index: 100; left: 2px; position: absolute; top: 270px"...
0
7223
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
7114
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
7488
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...
0
5623
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5045
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4702
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3191
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
762
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.