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, on .aspx page has a dropdown control "ddlName" Wish could have help at following:
Now I want to all the names from NameList will be populated at 'ddlName" when page loaded.
There is no problem for me to complete this task using data adapter, but I want to use stored procedure.
Thank you in advance. Your time is great appreciated.
ellen89
1 1145
then at time of define dataadatper u can used store procedure
like
oSqlDa = new SqlDataAdapter( "Store Procedure", connection object)
oSqlDa.fill(oDs ,"Namelist")
ddl.datasource = oDs.Table(0)
ddl.datameber = oDs.Table(0)
ddl.dataValuefi eld = "field name"
ddl.dataTextfie ld = "field name"
ddl.databind()
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Dannyboyo |
last post by:
I have what I hope is a simple request. I can't really code in javascript, but I am pretty good at cusomizing it with
slight modifications. I code in ASP and HTML.
I am trying to capture customer input of product names to put on custom labels we make. Some of the labels will have our
product names on them, but the customer can add other products that we do not sell.
So, on my product detail page I want a textbox that can have rows copied...
|
by: Mark Goldin |
last post by:
How can I populate a dropdownlist with data from a database using
Microsoft.ApplicationBlocks.Data ?
Thanks
|
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 populate multiple
webpages containing customer information. There isn't a one-to-one
correlation between the stored procedure and a webpage. In other
words, a webpage may have to refer to 1 or more DataTables to populate
itself. Therefore, a...
|
by: Chris Kettenbach |
last post by:
Hello all,
Quick question. I have a listbox that is populated by items from a database.
When the user select something from the list, I want to populate another
listbox based on the selection in the first.
Example lstCompany contains a list of company names with the primary key
field hidden. After user selects a company, I want to pass that primary key
back to a stored procedure and the 2nd listbox lstEmployees then be
populated with...
|
by: blouie |
last post by:
Is there a way that a bound ddl control can:
1. display the bound data, even if it does not match a selection in
the DDL?
2. allow the user to enter something other than the look up values?
I have a bound dropdown list that retrieves it's selections from a
look-up table. The DDL is bound to a database table and unless the
value in the (text) field matches one of the look-up values, the page
craps out.
| |
by: Mike P |
last post by:
I am trying to populate a dropdown from a stored procedure, but I am
getting the error 'Object doesn't support this property or method:
'Next' :
<!--#include file="include_connection.asp"-->
<!--#include file="adovbs.inc"-->
<%
set objConn = server.createobject("adodb.connection")
|
by: Javilen |
last post by:
Hello,
Maybe one of you can offer a possible solution to the problem I have below.
The request to me is to build a dynamically populating dropdown list from a text box.(something similar to Google Suggest.)
The idea is that the client wants to come in and search for something but may only know part of the name. So they type it in.
Eg. Egg
|
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:
- The combobox should repopulate if the user changes the value of Order#.
- The combobox should repopulate if the user moves through records (using the binding navigator.
My problem is that whenever I repopulate the combobox, it's value is reset to...
|
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, on .aspx page has a dropdown control "ddlName"
Wish could have help at following:
Now I want to all the names from NameList will be populated at 'ddlName" when page loaded.
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |