Results 1 to 2 of 2

Thread: error in code?

Hybrid View

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    May 2001
    Posts
    153

    Question error in code?

    Guys,

    will some one tell the error in the 3rd line in the code? I am new to c#.

    if (UserDs.Tables["users"].Rows.Count == 1) {
    // Response.Redirect firstGridPage.aspx;
    formsAuthentication.RedirectFromLoginPage(UserName.Text, true);

    }

    or i want to redirect the user from the login page when the login is successful using the commented line. I am getting error there as well.

    Please help me.

    thanks
    there r no alternatives 4 hardwork.

  2. #2
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    Sorry this didn't get answered sooner, probably should have posted it in the ASP.NET category. Anyway, here is the answer:
    Code:
    if (UserDs.Tables["users"].Rows.Count == 1) 
    { 
          Response.Redirect("firstGridPage.aspx"); 
    }

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width