Click here to Skip to main content
15,896,474 members
Home / Discussions / ASP.NET
   

ASP.NET

 
Questiontree page map Pin
kvijayajyothy12-Jun-07 20:45
kvijayajyothy12-Jun-07 20:45 
QuestionSession Pin
ShuklaGirish12-Jun-07 20:45
ShuklaGirish12-Jun-07 20:45 
AnswerRe: Session Pin
_AK_12-Jun-07 20:48
_AK_12-Jun-07 20:48 
GeneralRe: Session Pin
ShuklaGirish13-Jun-07 20:14
ShuklaGirish13-Jun-07 20:14 
GeneralRe: Session Pin
_AK_13-Jun-07 20:17
_AK_13-Jun-07 20:17 
AnswerRe: Session Pin
Chetan Ranpariya12-Jun-07 20:48
Chetan Ranpariya12-Jun-07 20:48 
AnswerRe: Session Pin
Sathesh Sakthivel12-Jun-07 20:49
Sathesh Sakthivel12-Jun-07 20:49 
Questionasp.net Pin
ling_luv12-Jun-07 20:21
ling_luv12-Jun-07 20:21 
hi, my last post i have already find out how to add the record. and i manage to add the record into the Movie Table. now i hav another problem which is in my form the actor n director have a dropdown list for user to choose n if in the dropdown list the the actor cannot be found the user can type in the name. how am i goin to do the code to detact if the dropdown list is empty then go to the textbox n add the name that they have key in? below is my code which i have done so far. Thanks a lot 4 the help




Protected Sub Submit_Click(ByVal sender As Object, ByVal e As System.EventArgs)

Dim Moviename
Dim Actorname
Dim Director
Dim Language
Dim Numberofdisc
Dim Studio
Dim ReleaseDate
Dim Price
Dim Quantity
Dim sql
Dim asql


Dim DBconn As New OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;data source=" & Server.MapPath("dvd_rental.mdb"))

DBconn.Open()


Moviename = Request.Form("txtmovieName")
Actorname = Request.Form("txtActorname")
Director = Request.Form("txtDirector")
Language = Request.Form("txtLanguage")
Numberofdisc = Request.Form("txtNoofdisc")
Studio = Request.Form("txtStudio")
ReleaseDate = Request.Form("txtReleaseDate")
Price = Request.Form("txtPrice")
Quantity = Request.Form("txtQuantity")


sql = "INSERT INTO Movie(MovieName, MovieLanguage, Numberofdisc, Studio, ReleaseDate, Price, Quantity) "

sql = sql & "VALUES('" & Moviename & "'"
sql = sql & ",'" & Language & "'"
sql = sql & ",'" & Numberofdisc & "'"
sql = sql & ",'" & Studio & "'"
sql = sql & ",'" & ReleaseDate & "'"
sql = sql & ",'" & Price & "'"
sql = sql & ",'" & Quantity & "')"


asql = "INSERT INTO Actor(Actor Name)VALUES('" & Actorname & "')"

Dim dbq As New OleDb.OleDbCommand
dbq.CommandType = CommandType.Text
dbq.CommandText = asql
dbq.Connection = DBconn
dbq.ExecuteNonQuery()



Dim dbquery As New OleDb.OleDbCommand
dbquery.CommandType = CommandType.Text
dbquery.CommandText = sql
dbquery.Connection = DBconn
dbquery.ExecuteNonQuery()


DBconn.Close()
DBconn = Nothing


Response.Redirect("WebAddResult.aspx")
End Sub











function Table1_onclick() {

}

function Text1_onclick() {

}

















































Add new DVD Record
DVD Title:
Actor: DataTextField="Actor_Name" DataValueField="Actor_Name" Width="132px">
SelectCommand="SELECT [Actor Name] AS Actor_Name FROM [Actor]">

Director:

DataTextField="Director_Name" DataValueField="Director_Name">
SelectCommand="SELECT [Director Name] AS Director_Name FROM [Director]">
Language:
Number of Disc:
Studio:
Release Date:
Price:
Quantity:













ling


ling
AnswerRe: asp.net Pin
Chetan Ranpariya12-Jun-07 20:23
Chetan Ranpariya12-Jun-07 20:23 
GeneralRe: asp.net Pin
ling_luv12-Jun-07 20:26
ling_luv12-Jun-07 20:26 
AnswerRe: asp.net Pin
Chetan Ranpariya12-Jun-07 20:45
Chetan Ranpariya12-Jun-07 20:45 
QuestionSorting problem in GridView [modified] Pin
Amr M. K.12-Jun-07 20:16
Amr M. K.12-Jun-07 20:16 
QuestionHTTP STATELESS.. Pin
Rahul8312-Jun-07 19:55
Rahul8312-Jun-07 19:55 
AnswerRe: HTTP STATELESS.. Pin
Elizma12-Jun-07 20:02
Elizma12-Jun-07 20:02 
GeneralRe: HTTP STATELESS.. Pin
Rahul8312-Jun-07 20:16
Rahul8312-Jun-07 20:16 
GeneralRe: HTTP STATELESS.. Pin
ShuklaGirish12-Jun-07 20:55
ShuklaGirish12-Jun-07 20:55 
AnswerRe: HTTP STATELESS.. Pin
SimulationofSai12-Jun-07 22:49
SimulationofSai12-Jun-07 22:49 
GeneralRe: HTTP STATELESS.. Pin
Rahul8312-Jun-07 23:05
Rahul8312-Jun-07 23:05 
GeneralRe: HTTP STATELESS.. Pin
SimulationofSai13-Jun-07 1:30
SimulationofSai13-Jun-07 1:30 
QuestionASP.Net Tree View--urgent Pin
venkata lakshmi prasanna12-Jun-07 19:45
venkata lakshmi prasanna12-Jun-07 19:45 
AnswerRe: ASP.Net Tree View--urgent Pin
Sathesh Sakthivel12-Jun-07 19:51
Sathesh Sakthivel12-Jun-07 19:51 
GeneralRe: ASP.Net Tree View--urgent Pin
venkata lakshmi prasanna12-Jun-07 20:36
venkata lakshmi prasanna12-Jun-07 20:36 
GeneralRe: ASP.Net Tree View--urgent Pin
Bajrang Singh13-Jun-07 4:22
Bajrang Singh13-Jun-07 4:22 
AnswerRe: ASP.Net Tree View--urgent Pin
leckey13-Jun-07 4:37
leckey13-Jun-07 4:37 
Questionopening other website inside my website Pin
alok.mailbox12-Jun-07 19:40
alok.mailbox12-Jun-07 19:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.