473,387 Members | 3,810 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,387 software developers and data experts.

Q: populate ddl from stored procedure

Hello,
I have a stored procedure sp1: “select * fro m myTale”. Now I need to
populate a dropdownlist1, how can you do this in C#, can you give me an
example?
Thanks,
Jim.

Nov 19 '05 #1
1 1441
On Mon, 11 Apr 2005 14:30:02 -0500, JIM.H.
<JI**@discussions.microsoft.com> wrote:
Hello,
I have a stored procedure sp1: “select * fro m myTale”. Now I need to
populate a dropdownlist1, how can you do this in C#, can you give me an
example?
Thanks,
Jim.


This article shows you how to bind a DataTable to a ddl, and how to call a
stored procedure. Put the two together and you have a deal; the only
problem is this example is in VB.NET, but you should easily see what to
do, the main classes to use, binding statements, etc. are the same....:

http://www.dotnetjunkies.com/Tutoria...D4A5A4622.dcik

--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET
Nov 19 '05 #2

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

Similar topics

0
by: Jeff Johnson | last post by:
I'm trying to populate a DropDownList with two columns of data I'm receiving from a stored procedure. All the examples I've found so far have mentioned modifying the SQL and are written in VB. ...
3
by: Yul | last post by:
Hi, We are in the process of designing an ASP.NET app, where a user will enter some 'Customer ID' to be queried in the database. If the ID is valid, several stored procedures will be called to...
0
by: Ed Crowley | last post by:
Would it be better to have the stored procedure return xml and populate the treeview from that? I was just wondering what the most efficient method is - the recordset is potentially very large.
1
by: Sheldon Penner | last post by:
I have been trying to build a web form using the SQL Data Adapter Configuration Wizard to create a dataset based on a parameterized stored procedure. I find that if I select "Use existing stored...
2
by: rn5a | last post by:
This function in a VB class file takes UserID as a parameter & returns a SqlDataReader to the calling function which exists in a ASPX page: Namespace NConnect Public Class Cart Private sqlConn...
0
TonFrere
by: TonFrere | last post by:
Hello, I'm building a windows form application in Visual C# using VS 2005. On my form I need to populate a combobox with Invoices# linked to the current reccord's Order# value. This means that: -...
2
by: Aswanth | last post by:
Hi.. I'm using Asp.Net with C#.... I'm having One Dropdownlist control(Users_Details_DDL) in Default.aspx Page... i'm having one Stored Procedure (Get_User_Email) which will display the Data...
1
by: ellen89 | last post by:
Hi All, I am new to this field, and is using VS.2005, language is C#. 1) created a database "Test" in sql 2005, had a table "NameList", a stored proc "GetAllName" 2) created a new website,...
3
by: FrustratedNoob | last post by:
I've got a database that I've been working on for over a year and a half but I've just recently finished the back end to the point of feeling comfortable with starting on a front end. So while...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.