Combo box Value and PostgreSQL.Net

Combo box Value and PostgreSQL.Net

Postby aspirevishal » Sat 08 Dec 2007 18:43

Hi ,

I dont know if this clasify as specific Question or PostgreSQL .Net Question.

Anyways :

When I use to do PHP and if a database had a two colum one with serial no and the other the corresponding value for that sno like

Code: Select all
1   | sugar
2   | salt

what i use to do is simple query it

select sno,tem from table;

then in PHP for combobox I use to populate the value as and the display would come with


Code: Select all

Then in insert statement of another table I simply use to insert the value of option tag

How can I accomplish the same with and combobox
Posts: 30
Joined: Fri 31 Aug 2007 03:30
Location: India

Postby SecureGen » Mon 10 Dec 2007 11:49

Here is an example of an .aspx page with data binding set up for a DropDownList:
Code: Select all
<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register Assembly="CoreLab.PostgreSql.Web, Version=, Culture=neutral, PublicKeyToken=09af7300eec23701"
    Namespace="CoreLab.PostgreSql.Web" TagPrefix="cc1" %>

    Untitled Page



            providername="<%$ ConnectionStrings:postgresConnectionString.ProviderName %>"
            selectcommand='SELECT * FROM "dept"'>

                    DataTextField="deptno" DataValueField="deptno">



Devart Team
Posts: 133
Joined: Thu 08 Sep 2005 06:27

Postby aspirevishal » Mon 10 Dec 2007 20:35

lots of thanks that gave me a pointer
Posts: 30
Joined: Fri 31 Aug 2007 03:30
Location: India

Return to dotConnect for PostgreSQL