Click here to Skip to main content
15,908,673 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Null Exception Pin
Paulo Zemek22-Feb-10 7:27
Paulo Zemek22-Feb-10 7:27 
AnswerRe: Null Exception Pin
Jason Vetter25-Feb-10 11:56
Jason Vetter25-Feb-10 11:56 
QuestionHow to use chart in RDLC? Pin
swaroop0922-Feb-10 0:01
swaroop0922-Feb-10 0:01 
AnswerRe: How to use chart in RDLC? Pin
Not Active22-Feb-10 0:29
mentorNot Active22-Feb-10 0:29 
AnswerRe: How to use chart in RDLC? Pin
Abhishek Sur22-Feb-10 1:23
professionalAbhishek Sur22-Feb-10 1:23 
Questionhow to use reporting services in sql server 2005 Pin
developerit21-Feb-10 23:50
developerit21-Feb-10 23:50 
AnswerRe: how to use reporting services in sql server 2005 Pin
swaroop0922-Feb-10 0:05
swaroop0922-Feb-10 0:05 
QuestionDropdownlistbox issue.... Pin
<<Tash18>>21-Feb-10 23:45
<<Tash18>>21-Feb-10 23:45 
Hi guys,
Actually im developing a web application on VS2003 framework 1.1, in this application i have several textboxes and one dropdown list box. Now the items in my dropdown listbox gets populated from the database table also i have an insert button on clicking it the datas in the textbox and also the selected item in the dropdown list box gets inserted into my database table. Here comes the issue now in my dropdown listbox say there are 2 items for example --> Tiger, Lion... since here tiger is the first element by default my listbox shows tiger may be from the dropdown list if i select lion it inserts only tiger.. in short my listbox doesnt identify my selected item..
The code is as follows:

private void Button1_Click(object sender, System.EventArgs e)
		{
			try
			{
				card = DropDownList1.SelectedItem.Text.ToString();
				name = TextBox34.Text;
				age = TextBox35.Text;
				gender = TextBox36.Text;
				con = new SqlConnection();
				con.ConnectionString = Session["sqlcon"].ToString();
				con.Open();
                              cmd = new SqlCommand();
				cmd.CommandType = CommandType.Text;
				cmd.CommandText = "Insert into card_details values('"+Session["User_ID"]+"',getDate(),'"+name+"','"+age+"','"+gender+"','"+card+"')";
                              cmd.Connection = con;
				cmd.ExecuteNonQuery();
                              cmd.Dispose();
				con.Close();
}
			catch (Exception exp)
			{
				Label39.Visible = true;
				Label39.Text = "Exception occured review log file for details";
				ExceptionHandler.HandleException("Exception",exp);
			}
			finally
			{
				if (rdr != null)
				{
					rdr.Close();
				}
				if (con != null)
				{
					con.Close();
					con.Dispose();
				}
			}
		}


I really dont know whats wrong in my code do plz help me..
Thanks & Regards,
Tash
AnswerRe: Dropdownlistbox issue.... Pin
Not Active22-Feb-10 0:27
mentorNot Active22-Feb-10 0:27 
GeneralRe: Dropdownlistbox issue.... Pin
<<Tash18>>22-Feb-10 0:40
<<Tash18>>22-Feb-10 0:40 
GeneralRe: Dropdownlistbox issue.... Pin
nainakarri22-Feb-10 0:53
nainakarri22-Feb-10 0:53 
GeneralRe: Dropdownlistbox issue.... Pin
<<Tash18>>22-Feb-10 1:03
<<Tash18>>22-Feb-10 1:03 
AnswerRe: Dropdownlistbox issue.... Pin
R. Giskard Reventlov22-Feb-10 0:53
R. Giskard Reventlov22-Feb-10 0:53 
GeneralRe: Dropdownlistbox issue.... Pin
<<Tash18>>22-Feb-10 1:02
<<Tash18>>22-Feb-10 1:02 
GeneralRe: Dropdownlistbox issue.... Pin
R. Giskard Reventlov22-Feb-10 1:14
R. Giskard Reventlov22-Feb-10 1:14 
Questionhow to show a label within an image but without disturbing the image. Pin
hari.kotha21-Feb-10 23:31
hari.kotha21-Feb-10 23:31 
AnswerRe: how to show a label within an image but without disturbing the image. Pin
Brij22-Feb-10 0:42
mentorBrij22-Feb-10 0:42 
Questionhow to prepare time sheet application for employees using asp.net with c#.net Pin
developerit21-Feb-10 23:21
developerit21-Feb-10 23:21 
AnswerRe: how to prepare time sheet application for employees using asp.net with c#.net Pin
Brij22-Feb-10 0:29
mentorBrij22-Feb-10 0:29 
QuestionDynamic Meta Keywords Pin
chamee12321-Feb-10 22:21
chamee12321-Feb-10 22:21 
AnswerRe: Dynamic Meta Keywords Pin
keyur satyadev21-Feb-10 22:29
keyur satyadev21-Feb-10 22:29 
AnswerRe: Dynamic Meta Keywords Pin
enjoycrack22-Feb-10 17:30
enjoycrack22-Feb-10 17:30 
QuestionWindows Cardspace Pin
Ramkumar_S21-Feb-10 21:37
Ramkumar_S21-Feb-10 21:37 
QuestionPaging not working properly on Modelpopup Ajax Control Pin
gautamamit821-Feb-10 21:34
gautamamit821-Feb-10 21:34 
QuestionWhy the dll is not updated in VS-2008? Pin
Prasadsm21-Feb-10 20:56
Prasadsm21-Feb-10 20:56 

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.