Click here to Skip to main content
15,892,072 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: How can i check textbox null inside masterpage Pin
Sherin Iranimose3-Jul-08 20:04
Sherin Iranimose3-Jul-08 20:04 
GeneralRe: How can i check textbox null inside masterpage Pin
deepthy.p.m3-Jul-08 22:04
deepthy.p.m3-Jul-08 22:04 
QuestionHow to use "User Controls" in Web Form? [modified] Pin
nguyenhh3-Jul-08 17:52
nguyenhh3-Jul-08 17:52 
AnswerRe: How to use "User Controls" in Web Form? Pin
Sherin Iranimose3-Jul-08 19:24
Sherin Iranimose3-Jul-08 19:24 
GeneralRe: How to use "User Controls" in Web Form? Pin
nguyenhh5-Jul-08 8:12
nguyenhh5-Jul-08 8:12 
AnswerRe: How to use "User Controls" in Web Form? Pin
viivekk3-Jul-08 19:29
viivekk3-Jul-08 19:29 
GeneralRe: How to use "User Controls" in Web Form? Pin
nguyenhh5-Jul-08 8:02
nguyenhh5-Jul-08 8:02 
QuestionSql Injection Pin
ngrj3-Jul-08 16:24
ngrj3-Jul-08 16:24 
Hi

am trying to avoid sql injection.

i want to check only the input provided by the user and not the
viewstate how to avoid checking the view state .

the code i used is below


public static string[] checklist=
{"@@","declare","delete","drop","fetch","fetch_status",
"sys","sysobjects","syscolumns","execute", "update","truncate"};

void app_BeginRequest(object sender, EventArgs e)
{
HttpRequest Request = (sender as HttpApplication).Context.Request;
foreach (string key in Request.QueryString)
CheckInputform(Request.QueryString[key]);
foreach (string key in Request.Form)
CheckInputform(Request.Form[key]);

}

private void CheckInputform(string parameter)
{
for (int i = 0; i<checklist.length;> {
if ((parameter.IndexOf(checklist[i], StringComparison.OrdinalIgnoreCase) >= 0))
{
HttpContext.Current.Response.Redirect("~/Error.aspx");
}
}
}


Any help

ngrj.
AnswerRe: Sql Injection Pin
Mark Churchill3-Jul-08 16:52
Mark Churchill3-Jul-08 16:52 
GeneralRe: Sql Injection Pin
ngrj3-Jul-08 17:06
ngrj3-Jul-08 17:06 
QuestionWizard sidebar Pin
kjosh3-Jul-08 13:52
kjosh3-Jul-08 13:52 
Questionhow to generate query at runtime ......... help plzz Pin
dream_liner_7e73-Jul-08 10:37
dream_liner_7e73-Jul-08 10:37 
AnswerRe: how to generate query at runtime ......... help plzz Pin
Christian Graus3-Jul-08 10:58
protectorChristian Graus3-Jul-08 10:58 
AnswerRe: how to generate query at runtime ......... help plzz Pin
dream_liner_7e73-Jul-08 11:18
dream_liner_7e73-Jul-08 11:18 
Questioncan't align the asp:listItems to left Pin
gottimukkala3-Jul-08 6:22
gottimukkala3-Jul-08 6:22 
AnswerRe: can't align the asp:listItems to left Pin
Sherin Iranimose3-Jul-08 6:58
Sherin Iranimose3-Jul-08 6:58 
QuestionHow do add controls from 'codebehind' ? Pin
tina->newcoder3-Jul-08 6:11
tina->newcoder3-Jul-08 6:11 
AnswerRe: How do add controls from 'codebehind' ? Pin
Sherin Iranimose3-Jul-08 6:18
Sherin Iranimose3-Jul-08 6:18 
GeneralRe: How do add controls from 'codebehind' ? Pin
tina->newcoder3-Jul-08 6:23
tina->newcoder3-Jul-08 6:23 
GeneralRe: How do add controls from 'codebehind' ? Pin
Sherin Iranimose3-Jul-08 6:33
Sherin Iranimose3-Jul-08 6:33 
GeneralRe: How do add controls from 'codebehind' ? Pin
tina->newcoder3-Jul-08 6:55
tina->newcoder3-Jul-08 6:55 
GeneralRe: How do add controls from 'codebehind' ? Pin
Christian Graus3-Jul-08 7:34
protectorChristian Graus3-Jul-08 7:34 
GeneralRe: How do add controls from 'codebehind' ? Pin
Sherin Iranimose3-Jul-08 20:50
Sherin Iranimose3-Jul-08 20:50 
GeneralRe: How do add controls from 'codebehind' ? Pin
tina->newcoder3-Jul-08 23:59
tina->newcoder3-Jul-08 23:59 
GeneralRe: How do add controls from 'codebehind' ? Pin
Sherin Iranimose4-Jul-08 1:04
Sherin Iranimose4-Jul-08 1:04 

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.