AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2004-01-20 : 07:30:49
|
Mathieu Cupryk writes "Is it possible in asp.net to create a web form to display say for instance the lookup tables as dropdownlist by just references through the creation of the table? That is Say I want to display in a form the other fields in a textbox (UserName, Password, HeadLine, FirstName, LastName, SecretWord, City) and the others lookup tables as dropdownlist is this possible? If so how could I go about do this.Also,I need help on creating signupusers referencing lookup tables. That is what is the appropriate way this is the old style. Now there is just a REFERENCE ,,, create table SignupUsers( UserID int identity primary key , UserName varchar(50) not null, PasswordHash varchar(50) not null, Salt varchar(10) not null, HeadLine varchar(50) null, TitleID varchar(10) not null references lookup_User_Title (TitleID), FirstName varchar(50) not null, LastName varchar(50) not null, Email varchar(75) not null, SecretWordTypeID varchar(50) not null references lookup_User_SecretWordType (SecretWordTypeID), SecretWord varchar(50) not null, Age integer not null , DOB datetime not null , Zodiac varchar(50) not null, GenderID integer null references Lookup_User_Gender (GenderID), City varchar(50), StateProvinceID integer null references Lookup_User_StateProvince (StateProvinceID), CountryID integer not null references Lookup_User_Country (CountryID), DateCreated datetime not null constraint [DF_tbl_SignupUsers_DateCreated] default (getdate()), LastLogin datetime not null constraint [DF_tbl_SignupUsers_LastLogin] default (getdate()) , LogCount int not null constraint [DF_tbl_SignupUsers_LogCount] default (1) UNIQUE (UserName))GO-- signup.aspx Create Tables for dropdownlist----------------------------------------------- 1CREATE TABLE Lookup_User_Title ( [TitleID] varchar(10) primary key, [TitleText] varchar (10) NOT NULL) GO----------------------------------------------- 2CREATE TABLE Lookup_User_Gender ( [GenderID] [int] IDENTITY (1, 1) NOT NULL , [GenderText] varchar (50) NOT NULL) GO----------------------------------------------- 3CREATE TABLE Lookup_User_SecretWordType ( [SecretWordTypeID] varchar(50) primary key, [SecretWordTypeText] varchar (50) NOT NULL) GO----------------------------------------------- 4CREATE TABLE Lookup_User_StateProvince ( [StateProvinceID] [int] IDENTITY (1, 1) NOT NULL , [StateProvinceText] varchar (50) NOT NULL) GO----------------------------------------------- 5CREATE TABLE Lookup_User_Country ( [CountryID] [int] IDENTITY (1, 1) NOT NULL , [CountryText] varchar (50) NOT NULL) GO Given the insert tables below:-- S I G N U P === P A G E 1-------------------------------------------------------------------------- signup.aspx First Page Lookup Tables which are dropdownlist----------------------------------------------- 1SET IDENTITY_INSERT Lookup_User_Title ONGOINSERT INTO Lookup_User_Title(TitleID,TitleText) VALUES('Mr.','Mr.')GOINSERT INTO Lookup_User_Title(TitleID,TitleText) VALUES('Ms.','Ms.')GOINSERT INTO Lookup_User_Title(TitleID,TitleText) VALUES('M |
|