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 VB.net 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
sno|item
---------
1   | sugar
2   | salt


what i use to do is simple query it

like
select sno,tem from table;

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


In HTML

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 PostGreSQL.net and combobox
aspirevishal
 
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=3.25.21.0, Culture=neutral, PublicKeyToken=09af7300eec23701"
    Namespace="CoreLab.PostgreSql.Web" TagPrefix="cc1" %>





    Untitled Page


   

   

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

                    DataTextField="deptno" DataValueField="deptno">
       

   
   

   


SecureGen
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
aspirevishal
 
Posts: 30
Joined: Fri 31 Aug 2007 03:30
Location: India


Return to dotConnect for PostgreSQL