Click here to Skip to main content
15,898,538 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionHow can I get an attribute of a DropDownList item using javascript? Pin
Martin_26-Jun-07 5:40
Martin_26-Jun-07 5:40 
AnswerRe: How can I get an attribute of a DropDownList item using javascript? Pin
kubben26-Jun-07 7:49
kubben26-Jun-07 7:49 
GeneralRe: How can I get an attribute of a DropDownList item using javascript? Pin
Martin_26-Jun-07 7:54
Martin_26-Jun-07 7:54 
GeneralRe: How can I get an attribute of a DropDownList item using javascript? Pin
Martin_27-Jun-07 3:24
Martin_27-Jun-07 3:24 
GeneralRe: How can I get an attribute of a DropDownList item using javascript? Pin
kubben27-Jun-07 3:27
kubben27-Jun-07 3:27 
QuestionSending Data Pin
boyindie26-Jun-07 5:03
boyindie26-Jun-07 5:03 
AnswerRe: Sending Data Pin
Not Active26-Jun-07 5:09
mentorNot Active26-Jun-07 5:09 
AnswerRe: Sending Data Pin
Fred_Smith26-Jun-07 5:18
Fred_Smith26-Jun-07 5:18 
Two things:

1) It looks as though you are not using Visual Studio, but have your server code inline - ie in the same file - as you have pasted it here. In this case you need to let the page know which procedure is to be associated with the button click event. Like this:

<asp:Button runat="server" ID="submit" Text="Submit" onclick="sendData" />


2) Within your sendData procedure, you must remember to close the database connection after use. Really, you ought to wrap the code in a try...catch...end try block - something like:

try
connection.Open()
' do your db stuff...
connection.CLose()
catch
If connection.State = ConnectionState.Open Then connection.Close()
end try


cheers
Fred
GeneralRe: Sending Data Pin
boyindie26-Jun-07 6:01
boyindie26-Jun-07 6:01 
GeneralRe: Sending Data Pin
Fred_Smith26-Jun-07 6:09
Fred_Smith26-Jun-07 6:09 
GeneralRe: Sending Data Pin
boyindie26-Jun-07 6:28
boyindie26-Jun-07 6:28 
GeneralRe: Sending Data Pin
Fred_Smith26-Jun-07 6:53
Fred_Smith26-Jun-07 6:53 
QuestionExport & Import Pin
Sinchan Nikam26-Jun-07 4:01
Sinchan Nikam26-Jun-07 4:01 
AnswerRe: Export & Import Pin
Not Active26-Jun-07 5:05
mentorNot Active26-Jun-07 5:05 
Questionauto response of mails. Pin
hkchauhan26-Jun-07 3:40
hkchauhan26-Jun-07 3:40 
AnswerRe: auto response of mails. Pin
Not Active26-Jun-07 5:01
mentorNot Active26-Jun-07 5:01 
AnswerRe: auto response of mails. Pin
Venkatesh Mookkan26-Jun-07 18:16
Venkatesh Mookkan26-Jun-07 18:16 
Questionform EncType=&quot;Multipart/Form-Data&quot; Pin
Brendan Vogt26-Jun-07 3:31
Brendan Vogt26-Jun-07 3:31 
AnswerRe: form EncType=&quot;Multipart/Form-Data&quot; Pin
Viral Upadhyay26-Jun-07 3:45
Viral Upadhyay26-Jun-07 3:45 
QuestionSQL Query in Multi-line TextBox in Web form Pin
Blumen26-Jun-07 3:28
Blumen26-Jun-07 3:28 
AnswerRe: SQL Query in Multi-line TextBox in Web form Pin
Viral Upadhyay26-Jun-07 3:41
Viral Upadhyay26-Jun-07 3:41 
GeneralRe: SQL Query in Multi-line TextBox in Web form Pin
Blumen26-Jun-07 19:11
Blumen26-Jun-07 19:11 
GeneralRe: SQL Query in Multi-line TextBox in Web form Pin
Viral Upadhyay26-Jun-07 20:30
Viral Upadhyay26-Jun-07 20:30 
Questionregular expression Pin
ritu432126-Jun-07 2:54
ritu432126-Jun-07 2:54 
AnswerRe: regular expression Pin
Brendan Vogt26-Jun-07 3:36
Brendan Vogt26-Jun-07 3:36 

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.