Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 994
  • Last Modified:

REDIRECT CODE BEHIND C#

Please find the attached files for reference.   I need assistance in re-directing depending upon whether a checkbox is clicked.   Specifically the "MM" checkbox.   I would like the user to be redirected to a diferent URL if this box is checked.   If it is not checked I need the page to be redirected to another URL.

If "MM" is checked it ........   www.yahoo.com

Un checked........................   www.home depot.com

The below code is not functioning.......

{
    if (MM.Checked)
        Response.Redirect("www.yahoo.com");
    else
        Response.Redirect("www.homedepot.com");
}
default.aspx
Default.aspx.cs
0
BOEING39
Asked:
BOEING39
1 Solution
 
käµfm³d 👽Commented:
Where is this if statement at in the code you attached? For such code to work, it is going to depend on where (which method) you place the code in.

On a side note, are you aware of what SQL Injection is? Your code is primed for such an attack.
0
 
sarabhaiCommented:
after the line of code
smtpClient.Send(message);

put your code to redirect the page.
0
 
BOEING39Author Commented:
Most accurate response....
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now