Click here to Skip to main content
16,011,447 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionPrinting Datagrid with multiple pages on single button click Pin
Vipin.d16-Jun-07 21:06
Vipin.d16-Jun-07 21:06 
AnswerRe: Printing Datagrid with multiple pages on single button click Pin
WillemM17-Jun-07 5:30
WillemM17-Jun-07 5:30 
GeneralRe: Printing Datagrid with multiple pages on single button click Pin
Vipin.d17-Jun-07 19:17
Vipin.d17-Jun-07 19:17 
QuestionString.Format Pin
ASPnoob16-Jun-07 20:59
ASPnoob16-Jun-07 20:59 
AnswerRe: String.Format Pin
Arun.Immanuel16-Jun-07 21:22
Arun.Immanuel16-Jun-07 21:22 
GeneralRe: String.Format Pin
ASPnoob16-Jun-07 22:19
ASPnoob16-Jun-07 22:19 
GeneralRe: String.Format Pin
PandemoniumPasha16-Jun-07 22:58
PandemoniumPasha16-Jun-07 22:58 
GeneralRe: String.Format Pin
Dave Sexton16-Jun-07 23:10
Dave Sexton16-Jun-07 23:10 
Firstly, that appears to be a nasty bit of code. No wonder you're confused. If I were you I'd do some research, some learning & then rewrite it properly.

strSQL is being used here as an SQL Select statement[^] that retrieves data, in this case an email address, from a database (I'm guessing Access) using a Command Object[^].

Why is this code is bad? Here's a few reasons off the cuff - I'm giving you these (and a few links for your benefit) to point you in the right direction when you rewrite it

1. The function is being passed an argument (strUsername) that is never used.
2. There is no input validation being done on the email address in the SQL statement which opens the database up to SQL Injection[^].
3. There are no Try...Catch...Finally[^] blocks - standard practice when working with a database.

I shudder to think what the rest of this code looks like... Good luck.
QuestionAccess denied to a file IIS Pin
kallileo16-Jun-07 18:25
kallileo16-Jun-07 18:25 
AnswerRe: Access denied to a file IIS Pin
Expert Coming16-Jun-07 20:38
Expert Coming16-Jun-07 20:38 
AnswerRe: Access denied to a file IIS Pin
vikasparth16-Jun-07 22:07
vikasparth16-Jun-07 22:07 
GeneralRe: Access denied to a file IIS Pin
kallileo17-Jun-07 21:57
kallileo17-Jun-07 21:57 
QuestionKeyPress Event in ASP.NET C#? Pin
railesh16-Jun-07 2:16
railesh16-Jun-07 2:16 
AnswerRe: KeyPress Event in ASP.NET C#? Pin
Expert Coming16-Jun-07 4:48
Expert Coming16-Jun-07 4:48 
AnswerRe: KeyPress Event in ASP.NET C#? Pin
www.Developerof.NET16-Jun-07 7:08
www.Developerof.NET16-Jun-07 7:08 
AnswerRe: KeyPress Event in ASP.NET C#? Pin
Not Active16-Jun-07 13:26
mentorNot Active16-Jun-07 13:26 
QuestionExecuting more than one query Pin
Tarik Guney16-Jun-07 0:34
Tarik Guney16-Jun-07 0:34 
AnswerRe: Executing more than one query Pin
Expert Coming16-Jun-07 1:16
Expert Coming16-Jun-07 1:16 
AnswerRe: Executing more than one query Pin
Dave Sexton16-Jun-07 2:01
Dave Sexton16-Jun-07 2:01 
AnswerRe: Executing more than one query Pin
Arun.Immanuel16-Jun-07 2:11
Arun.Immanuel16-Jun-07 2:11 
GeneralRe: Executing more than one query Pin
Tarik Guney16-Jun-07 7:21
Tarik Guney16-Jun-07 7:21 
QuestionDifference b/e Onlnit(), OnPreInit() and LoadViewState()/ LoadPostBackData() Pin
vikasviswan15-Jun-07 21:41
vikasviswan15-Jun-07 21:41 
AnswerRe: Difference b/e Onlnit(), OnPreInit() and LoadViewState()/ LoadPostBackData() Pin
Christian Graus15-Jun-07 22:04
protectorChristian Graus15-Jun-07 22:04 
GeneralRe: Difference b/e Onlnit(), OnPreInit() and LoadViewState()/ LoadPostBackData() Pin
vikasviswan15-Jun-07 22:19
vikasviswan15-Jun-07 22:19 
GeneralRe: Difference b/e Onlnit(), OnPreInit() and LoadViewState()/ LoadPostBackData() Pin
Christian Graus15-Jun-07 22:32
protectorChristian Graus15-Jun-07 22:32 

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.