Click here to Skip to main content
15,905,144 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Problem deleting selected value from dropdownlist Pin
Not Active12-Feb-08 16:16
mentorNot Active12-Feb-08 16:16 
GeneralRe: Problem deleting selected value from dropdownlist Pin
Ravenet12-Feb-08 16:10
Ravenet12-Feb-08 16:10 
GeneralRe: Problem deleting selected value from dropdownlist Pin
Not Active12-Feb-08 16:21
mentorNot Active12-Feb-08 16:21 
GeneralRe: Problem deleting selected value from dropdownlist Pin
Ravenet12-Feb-08 16:24
Ravenet12-Feb-08 16:24 
GeneralRe: Problem deleting selected value from dropdownlist Pin
Not Active12-Feb-08 16:44
mentorNot Active12-Feb-08 16:44 
GeneralRe: Problem deleting selected value from dropdownlist Pin
Ravenet12-Feb-08 23:22
Ravenet12-Feb-08 23:22 
GeneralRe: Problem deleting selected value from dropdownlist Pin
wajans13-Feb-08 7:18
wajans13-Feb-08 7:18 
GeneralRe: Problem deleting selected value from dropdownlist Pin
Not Active13-Feb-08 7:32
mentorNot Active13-Feb-08 7:32 
Are you certain that DropDownList1.SelectedValue is correct?

Since ID appears to be a unique key in the table structure use that for the value. This eliminates the need to pass strings around and do string comparisons. It also guards against deleting multiple rows with duplicate state values.

DropDownList1.DataValueField = "ID";

int id = Convert.ToInt32(DropDownList1.SelectedValue);
string strDelete = "delete state from tblState where ID=" + id + ";


only two letters away from being an asset

GeneralRe: Problem deleting selected value from dropdownlist Pin
wajans13-Feb-08 8:42
wajans13-Feb-08 8:42 
GeneralRe: Problem deleting selected value from dropdownlist Pin
Not Active13-Feb-08 9:19
mentorNot Active13-Feb-08 9:19 
GeneralRe: Problem deleting selected value from dropdownlist Pin
wajans13-Feb-08 9:35
wajans13-Feb-08 9:35 
GeneralExecuting Textbox Text Pin
waheed awan12-Feb-08 15:06
waheed awan12-Feb-08 15:06 
GeneralRe: Executing Textbox Text [modified] Pin
Venkatesh Mookkan12-Feb-08 15:17
Venkatesh Mookkan12-Feb-08 15:17 
GeneralRe: Executing Textbox Text Pin
Not Active12-Feb-08 15:45
mentorNot Active12-Feb-08 15:45 
GeneralRe: Executing Textbox Text Pin
Venkatesh Mookkan12-Feb-08 15:53
Venkatesh Mookkan12-Feb-08 15:53 
GeneralRe: Executing Textbox Text Pin
Not Active12-Feb-08 15:53
mentorNot Active12-Feb-08 15:53 
GeneralRe: Executing Textbox Text Pin
waheed awan13-Feb-08 7:02
waheed awan13-Feb-08 7:02 
GeneralRe: Executing Textbox Text Pin
Not Active13-Feb-08 7:22
mentorNot Active13-Feb-08 7:22 
GeneralRe: Executing Textbox Text Pin
waheed awan13-Feb-08 12:06
waheed awan13-Feb-08 12:06 
GeneralRe: Executing Textbox Text Pin
Not Active13-Feb-08 16:08
mentorNot Active13-Feb-08 16:08 
GeneralRe: Executing Textbox Text Pin
waheed awan13-Feb-08 7:03
waheed awan13-Feb-08 7:03 
Questionhow would??? Pin
learningman12-Feb-08 11:49
learningman12-Feb-08 11:49 
AnswerRe: how would??? Pin
Christian Graus12-Feb-08 11:54
protectorChristian Graus12-Feb-08 11:54 
GeneralSystem.UnauthorizedAccessException: Access to the path "server/file_share" is denied Pin
mayl12-Feb-08 10:42
mayl12-Feb-08 10:42 
GeneralRe: System.UnauthorizedAccessException: Access to the path "server/file_share" is denied Pin
Venkatesh Mookkan12-Feb-08 15:24
Venkatesh Mookkan12-Feb-08 15:24 

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.