Adding Data From More Than Two Columns In Drop Down List (not Concatenating Them)?

Jun 22, 2010

adding data from more than one columns of a table in drop down list but not concatening them.

Like a table having columns Station_1 , Station_2 , Station_3. All these columns having place names.

Now I want to list the distinct station/place names from each columns Station_1, Station_2 and Station_3 in my drop down list.

How to do this I serched everywhere in but not found the solution..

View 4 Replies


Similar Messages:

Forms Data Controls :: Can Show Multiple Columns In Drop Down List Or List Box

Jun 24, 2010

I have drop down list box that I would like to show two columns, is this possible? Or can it be done with a list box?The query correctly retrieves all of the table data to be displayed, one colum is an abbreviation, the other a bit longer description.

View 2 Replies

Adding A Drop Down List On The Master Page And Filling It With Data?

Apr 16, 2010

i'm having this issue, in ASP.NET MVC 2 where I'm adding a drop down list on the master page and filling it with data from an abstract master controller. When an option is selected an submit button clicked, it reroutes you to a new page. so lets say

the page lives on http://domain.com/landingPage i'm on: http://domain.com/landingPage i select option and submit takes me to

http://domain.com/landingPage/Projects/FramedPage i select again and now the post tries to go to:

http://domain.com/landingPage/Projects/landingPage/Projects/FramedPage because of the action="" i have set on the form tag.

MasterPage:

<form method="get" action="landingPage/Projects/FramedPage">
<%= Html.DropDownList("navigationList")%>
<input id="navSubmitBtn" class="btnBlue" type="submit" value="Take Me There" /> [code]...

The problem i am having is that if I am ON that page

View 1 Replies

Web Forms :: Adding List Items To Drop Down Control From Generic List?

Feb 6, 2010

I have the following Students class:

[Code]....

I need the 1 since it's a foreign key in another table. For the life of me, I can't get this to work like this.

View 7 Replies

Web Forms :: Listing Two SQL Columns Within The Same Drop Down List?

Apr 20, 2010

I am having trouble listing two columns from a SQL database into a DDL. I dont want to concatenate them but just want to list them down as a list in the DDL.Here is the code for the DDL which currently is concatenating the two fields:

<asp:DropDownList ID="DropDownList10" runat="server"
DataSourceID="SqlDataSource3" DataTextField="Vendor_Name"
DataValueField="Vendor_Name"

[code]...

View 7 Replies

SQL Server :: Concatenating Ntext Datatype Columns?

Dec 6, 2010

i have the below query where MessageText column is of ntext datatype..whe n i run the below query it is giving me the below error. Error :The data types ntext and varchar are incompatible in the add operator.

select li.LookUpPageInfoId,
li.PageMessageID,
li.PathMessageID,
li.IsActive,
m.MessageID,
(select messagetext from messages where messageid=pagemessageid and channelid=m.ChannelID)+'/'+
m.MessageText as TotalText,
m.ChannelID
from
LookUpPageInfo as li left outer join
Messages as m on m.MessageID=li.PathMessageID and li.IsActive=1

Can some one suggest me how to concatenate the ntext column....but the above works good if the column MessageText is of nvarchar(max) datatype.

View 2 Replies

Concatenating Results From SQL Query And NULL Columns?

May 11, 2010

I need to concatenate several columns of a table into a single value, then show that value in an asp dropdownlist. The SQL code I'm issuing is as follows:

SELECT UserID, CustomerNum, UserName + ' - ' + UserAddress + ',' + UserCity + ' ' + UserState AS UserInfo
FROM Users
WHERE (CustomerNum = @CustomerNum)
ORDER BY UserName

I then set 'UserInfo' as the text field in the dropdownlist.This generally works, except occasionally one of the columns in the database is null (for example, UserState). When that happens, the entire concatenation is null, and I get an empty entry in the dropdownlist.

Is there something in SQLServer that will allow me to ignore those NULL results, or will I have to code something up in the DataBind event?

View 6 Replies

C# - Adding Two Ranges With Range Number To Drop Down List?

Mar 22, 2011

I am getting Range1 and Range2 from database. Dataset is like below.

Range1 Range2

AB100 XY200

AB300 XY400

AB500 XY600

I have to bind these ranges to a Drop Down List as list items includung range number in my application.So list item should be like ==> 1 AB100 XY200 . When user selects a range I have to pass Range1 and Range2 to database.How can I bind the two ranges with range number to Drop Down List.

View 1 Replies

Web Forms :: Adding Drop Down List To Webpart Property?

Feb 18, 2010

I have a webpart which contains a dropdownlist in the Webpaart property and its working fine. The code is below.

public enum ItemCount
{
One = 1,
Five = 5,
Ten = 10

[Code]....

View 2 Replies

Web Forms :: Adding Two Ranges With Range Number To Drop Down List?

Mar 22, 2011

I am getting Range1 and Range2 from database. Dataset is like below.

Range1 Range2

AB100 XY200

AB300 XY400

AB500 XY600

I have to bind these ranges to a Drop Down List as list items includung range number in my application.So list item should be like ==> 1 AB100 XY200 . When user selects a range I have to pass
Range1 and Range2 to database.

How can I bind the two ranges with range number to Drop Down List.

View 5 Replies

SQL Reporting :: Adding Image To Local Report Export Drop Down List?

Nov 1, 2010

Is there an easy way to add image to the drop down list that is build into the report viewer export list?

View 1 Replies

Web Forms :: Drop Down List Dependant On Selection In Another Drop Down List?

Mar 30, 2010

I have a drop down list that has the initials of about 12 of our sales guys.How can I make it so that when they select their initials from the list, the next drop down list only shows their customers.In my database there is a column for customer name and salesman.

View 6 Replies

Web Forms :: How To Have 2 Cascading Drop Down Lists For The Same Drop Down List

Mar 12, 2010

How can I have 2 Cascading Drop Down Lists for the same Drop Down List?here is my problemi have 3 drop down lists read from database1- Schools List 2- Classes List3- Teachers ListEvery School will have more than 1 Class and more than 1 TeacherWhat I want is when user select a School from Schools Drop Down List then BOTH (Classes and Teachers) should be refreshed based on the School Drop Down List

View 1 Replies

Forms Data Controls :: Adding An Image In The Drop Down Data?

Oct 7, 2010

Does someone know how to add an image in a drop down data?

View 1 Replies

Web Forms :: Adding New Columns To Data In The Webform?

May 10, 2010

I have this webform which displays some information from the database in a textbox named createdby as shown in the code

I have a datagrid which has the following columns which get displayed

[code]...

now I want to add two new columns to this datagrid named createdby createdtime which is the data in the above textbox.I have posted html and csharp code for existing.

[code]....

View 8 Replies

Button To Select Data From A Drop Down List?

Apr 22, 2010

I have a drop down list that populates information about the product from an access database (vb) when the user makes a selection. would like to have minimal product info on the home page so when the user selects the button for example 'view details' they will be taken to the product screen with the item already selected in the drop down list and information showing.

View 6 Replies

ADO.NET :: Binding Data From Database To Drop Down List Using EF?

Jan 12, 2011

I have a table Person (in my database) which has fields like PersonID, PersonName, PersonSurname, etc. What I'd like to do is to bind the PersonName + PersonSurname (e.g. Mark Black) as values for displaying the data in drop down list and PersonID as the data identifier.

As I'm still new with Entity Framework I'm not sure how to manage to do it.

View 2 Replies

Forms Data Controls :: How To Use Drop Down List

Oct 27, 2010

when i am using dropdownlistin asp.net when i amselect the value from the list it cannot that the selected value but it can take only the first value of list.

How can i select the value in the dropdownlist.

View 4 Replies

Forms Data Controls :: Trying To Get The Value From The Drop Down List?

Jul 9, 2010

I have a gridview with a drop down list. When I do the update I try to get the value from the drop down list, but I get an error saying that the drop down list control 'ddlType' can't be found.

Here's the code.

[Code]....

View 2 Replies

Web Forms :: Get Drop Down List Data Using SQL Command?

Sep 15, 2010

i have generate AccNo in my form for user (AccNo will appear in form when they click for registration-"AccNo" not saved yet into database..

i want to read the "AccNo" and recheck("AccNo" check availability and update to next ID if available) and update to database when user click "SAVE" button..

View 7 Replies

Forms Data Controls :: Adding Columns To Databound Datagrids?

Mar 5, 2010

I have started creating a DAL and have successfully bound my adaptor and the query within the adaptor to a gridview.

In lots of the intranet type apps I code in regular ASP for myself I often have a few columns with little icons in that do various things for that rows identity, such as drill down to more details, overlay a graph, text the person via an ajax call, send em an email via ajax and so on.

I think Ive got the hang of styling elements of each row depending on the data but Im completely at a loss as how to add a column which would have an icon whos url link properties would be dependant on the data.

EG

ROW1 | Name | Email Address | ICONFOR EMAIL(with a querystring id matching the row id) | ICON FOR MORE DETAILS (with a querystring id matching the row id)

I realise I am probably looking at this the wrong way but its difficult when you are almost on autopilot doing these things in classic ASP.

View 1 Replies

Forms Data Controls :: Adding Columns To A Gridview Dynamically?

Nov 11, 2010

is there a way I can add a column dynamically from code behind to the gridview in my page?

View 5 Replies

Forms Data Controls :: How To Position The List Drop Down

Dec 30, 2010

In this code you can see the select statement that the customers are selected for display to the user. Order by is at least being used to disply in name order. but this example here is one of several similar dropdowns. I would like that if they picked one customer then the next view show should be the same customer

<
order by customername
"
asp:SqlDataSource
ID="Customers"
runat="server"
ConnectionString="<%&#36;
ConnectionStrings:SecurityDB_20101025ConnectionString %>"
SelectCommand="SELECT
* FROM [Customers] WHERE ([CustomerId] = ISNULL(@CustomerId, '') OR @IsSuperAdmin = 1 )
>
[code]...

View 3 Replies

Forms Data Controls :: Add Drop Down List To Certain Pages?

Apr 14, 2010

I've built my own CMS using vb. It displays the pagetitle, summary and body from a database, depending upon what parameters are passed in the url.

Some pages require a drop down list where users can select a document from a list.

Is there a way to add this to the page?

something like:

[Code]....

View 1 Replies

C# - How To Add A Data Object Of A Class Array To A Drop Down List

Oct 12, 2010

I have an array for type Person

Person[] Traders = GetTraders();

Person class contains data objects such as first name, last name etc.

I want to add all first names to a dropdownlist. How can i do that? I tried doing it like this, but it won't get the first names:

ddl_traders.DataSource = traders;

EDIT

Person has the following string fields: FirstName, LastName, login.

I want the dropdownlist to display FirstName, but the value has to be the logins. I'm fairly certain that is possible, although I have no idea how it can be done.

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved