Checking from DB

Results 1 to 2 of 2

Thread: Checking from DB

  1. #1
    Join Date
    Dec 1969

    Default Checking from DB

    1. How to check whether a user name and password exist in the database. In the old ASP, I have used EOF and BOF and then using Response.Redirect if the username and password did not match. Firstly, I am unable to use Response.Redirect in HTML page where I have the ADO.NET connection to check the value. Further, how can be determine whether a row has been retrieved or not. IS there a method like Not null.<BR><BR>2. How can we know whether a session has expired. I am using session objects and would like to display an error message whenever the session has expired.<BR><BR>3. How can I edit the height of Data Grid Columns. I have used Item-Style Height but to no effect. The Data grid height changes whenever I add a template column.<BR><BR>4. Can I pass session Information from ASP.NET page to an ASP page. <BR><BR>Thanks<BR><BR>Ashish

  2. #2
    Join Date
    Dec 1969

    Default RE: Checking from DB

    1. use a sqlclient connector then on your execute use:<BR>dim com as sqlcommand<BR>com = new sqlcommand(yoursql, yourconnection)<BR>If com.executeScalar() &#062; 0 Then<BR> &#039;you got a record, now redirect<BR>else<BR> &#039;no record<BR>end if<BR><BR>2. Are you password protecting your pages? If so, then consider either Forms Authentication or Windows Authentication. Just do a search on either one of those for tons of info. The forms auth will redirect your user to your login page if their time has expired.<BR><BR>3. The heigth of the rows are determained by the height of the datagrid. It will adjust of course to your data.<BR><BR>4. Sessions are handled by a different entity in The only real way to pass them to an asp page is by passing them in a querystring or as form elements.<BR><BR><BR><BR>

Posting Permissions

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