With this code i fill my dropdownlist:
ddlReisemal.DataSource = DBFactory.GetReisemal().DefaultView;
ddlReisemal.DataTextField = "Name";
ddlReisemal.DataValueField = "ID";
ddlReisemal.DataBind();
How can I add a blank row at the top?
Eirik Eldorsen 2 1082
Hi
Quite Simple, You can try this.
ListItem lic = new ListItem("Select", "0")
ddl.items.insert(0,lic)
Instead of "Select", you can give as you required...
good programming....
Regards,
Kannan
"Eirik Eldorsen" <ku*******@hotmail.com> wrote in message news:da*********************@news.telia.no... With this code i fill my dropdownlist: ddlReisemal.DataSource = DBFactory.GetReisemal().DefaultView; ddlReisemal.DataTextField = "Name"; ddlReisemal.DataValueField = "ID"; ddlReisemal.DataBind(); How can I add a blank row at the top? Eirik Eldorsen
Thanks :-D
"Kannan Meiappan" <ka******@hotmail.com> wrote in message news:%2****************@TK2MSFTNGP12.phx.gbl...
Hi
Quite Simple, You can try this.
ListItem lic = new ListItem("Select", "0")
ddl.items.insert(0,lic)
Instead of "Select", you can give as you required...
good programming....
Regards,
Kannan
"Eirik Eldorsen" <ku*******@hotmail.com> wrote in message news:da*********************@news.telia.no... With this code i fill my dropdownlist: ddlReisemal.DataSource = DBFactory.GetReisemal().DefaultView; ddlReisemal.DataTextField = "Name"; ddlReisemal.DataValueField = "ID"; ddlReisemal.DataBind(); How can I add a blank row at the top? Eirik Eldorsen This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: John |
last post by:
How do I prevent blank data from being entered into a table?
For instance, the user fills out a form, but if a field is left blank, then
the entire entry won't be filled in. This isn't necessarily a form
validation thing, just that if all the fields are filled, then proceed to
enter data, if not then don't.
Thanks in advance!
|
by: Jerry Sievers |
last post by:
Fellow coders; I am curious about a difference in behavior between
Mozilla and MSIE.
The scenario;
1. a php form page is loaded on first hit with field values set to
various things including many empty strings.
2. User fills out some fields but leaves blank one or more or
otherwise causes invalid input and database error.
|
by: JDS |
last post by:
Hi, all. I'd like to do the following, preferably *without* resorting to
JavaScript:
I have a long, dynamically-generated form questionnaire. Not all of the
form fields are dynamically generated, though.
I'd like to capture the NAME of every HTML form field element on the
server, even if that element is submitted blank. The trouble is,...
|
by: dmcconkey |
last post by:
Hi folks,
I have a client with four websites. Each site has a contact form that
is identical. They all have "required" fields validated through a
JavaScript onSubmit() function. Upon validation, post values go to a
PHP processing page that adds values to a database and generates an
email to someone in marketing.
For three of these sites,...
|
by: Matt Herson |
last post by:
I am looking for a validation script that will only look at the fields in
the cgi form, determine if the fields are filled out, then if one or more
are blank will write a message at the top of the page stating that some
fields have not been filled out. I don't want a pop-up, I just want to send
them back. I had seen something that did this...
| |
by: MX1 |
last post by:
Please help if you can. I have a form with an address field. There are 6
fields:
Name1
Name2
Address1
Address2
CityStateZip
Country
|
by: Tim Graichen |
last post by:
I have FrmMain that has one subform (SbForm).
FrmMain is filled with records from Tbl1.
SbForm is filled with records from Tbl2 based on the current selected record
in FrmMain from Tbl1.
FrmMain properties has AllowAdditions = NO until the 'Edit/Add Rec' button
is clicked, setting AllowAdditions=Yes
SbForm properties has AllowAdditions =...
|
by: Egbert Nierop \(MVP for IIS\) |
last post by:
Hi,
I have a complex asp.net 1.1 program that dynamically needs to load controls
(LoadControl)
The textboxes etc inside these controls keep viewstate and values but not
within
Page_Load()
when that event is 'going on' the load control happens but the values are
not yet 'filled in' They are filled in only -when- the pageload event has
|
by: lorirobn |
last post by:
Hi,
I have a form with several combo boxes, continuous form format, with
record source a query off an Item Table. The fields are Category,
Subcategory, and Color. I am displaying descriptions, not ID's, so I
have to convert the ID's from various lookup tables.
The combo boxes work fine except for subcategory, which is dependent on...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
|
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...
| |
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
|
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...
|
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...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...
|
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: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
| |