|
can you post the code ?
Thanks and Regards
Sandeep
If you want something you never had,
do something you have never done!
|
|
|
|
|
This is the code:
Public Sub login_Check()
Dim LoginCheckdataset As New DataSet
Dim Alogindataset As New DataSet
Try
Dim D As String = Txtlogin.Text.Trim
Dim A() As String
Dim Fname As String
Dim Lname As String
If Txtlogin.Text.Trim.ToUpper = "ADMIN" Then
Dim ALogincomm As New SqlCommand("AdminLogin",
LSCon.Siteconnection)
ALogincomm.CommandType = CommandType.StoredProcedure
ALogincomm.Parameters.Add("@login", Txtlogin.Text.Trim)
ALogincomm.Parameters.Add("@pass", TxtPass.Value)
Dim Aloginada As New SqlDataAdapter(ALogincomm)
Aloginada.Fill(Alogindataset)
If Alogindataset.Tables(0).Rows.Count <> 0 Then
Name = Txtlogin.Text.Trim
Response.Redirect("Pending Users.aspx")
Else
Label5.Visible = True
Label5.Text = "Password Entered is not correct or Login is not correct."
End If
Else
Dim Month As String
Dim Day As Integer
Dim Year As Integer
Dim Date1 As String
Day = Now.Day
Month = Now.Month
Year = Now.Year
If Month > 9 Then
Date1 = Day & "/" & Month & "/" & Year
Else
For i As Integer = 1 To 9
If Month = i Then
Month = "0" & i
Date1 = Day & "/" & Month & "/" & Year
End If
Next
End If
Dim EXP As Date
Dim LoginCheckComm As New SqlCommand("Login_Authorization",
LSCon.Siteconnection)
LoginCheckComm.CommandType = CommandType.StoredProcedure
LoginCheckComm.Parameters.Add("@LoginID", Txtlogin.Text.Trim)
LoginCheckComm.Parameters.Add("@Pass", TxtPass.Value)
Dim LoginCheckAda As New SqlDataAdapter(LoginCheckComm)
LoginCheckAda.Fill(LoginCheckdataset)
If LoginCheckdataset.Tables(0).Rows.Count <> 0 Then
EXP = LoginCheckdataset.Tables(0).Rows.Item(0).Item("ExpDate")
If EXP.Date < Date1 Then
Label5.Visible = True
Label5.Text = "Your Login Has Expired."
Exit Sub
Else
UserType = LoginCheckdataset.Tables(0).Rows.Item(0).Item("TypeName").ToString
Name = Txtlogin.Text.Trim
Response.Redirect("Main Form.aspx")
End If
Else
Label5.Visible = True
Label5.Text = "Password Entered is not correct or Login is not correct."
Exit Sub
End If
End If
Catch ex As Exception
Label5.Text = ex.Source & " " & ex.Message
Finally
LSCon.close()
End Try
End Sub
Mohinder Singh
|
|
|
|
|
In this where u r using loop ?
|
|
|
|
|
vengaqua wrote: t displays thread was aborted.
Are you giving response.end anywhere in the loop ?
|
|
|
|
|
|
Response.Redirect("Logindms.aspx",false);
pass the value false as the second parameter of the Response.Redirect method
dharmender
|
|
|
|
|
gvishu wrote: Response.Redirect("Logindms.aspx",false);
What do mean by false ?
|
|
|
|
|
|
thanks dear not it is not going in the catch loop
Mohinder Singh
|
|
|
|
|
hello
am a beginner in programming asp.net(vb),and would like to know how can I code a botton to enter the value in the textbox and be displyed in the GridView,for modification before it can be sent to the manager.
Olga m
|
|
|
|
|
Oga M wrote: how can I code a botton to enter the value in the textbox and be displyed in the GridView
You can create textbox obect and assign whatever values you want to that. To add that to gridview use gridview.controls.add(textboxobject)
|
|
|
|
|
can any one help me with how to get listed on google
so that our page should flash first in search of same type of metatag contents
|
|
|
|
|
Means you want to show your page first when query related to it is fired
you can't do that it depends on Google engine , if the your page had maximum numbers of hits and it is stored in Database of Google then you your page will displayed first.
Thats why you will find Sponsor means they pay to Google for showing their pages
Thanks and Regards
Sandeep
If you want something you never had,
do something you have never done!
|
|
|
|
|
harryforum wrote: so that our page should flash first in search of same type of metatag contents
All developers are thinking the same thing. But answer from my side is "you can't do this". Search engine will rank your pages using different criterias. It won't depend only on meta tags. It will check the content, link popularity. If you want to bring your pages for the search criterias, try using Google adwords. But you need to pay for it. Your ads will appear in the right side as sponsored results. You need to pay to google according to the no of clicks you are getting through google.
To understand how search engines work and rank check this documentation
http://infolab.stanford.edu/~backrub/google.html[^]
|
|
|
|
|
Hi all,
Can anybody give syntax of Response.Redirect while passing
multiple values in ASP.NET/C#...
I want to pass 4 values for getting them by Request.Querystring.
Thanks,
cfit
dfdf
|
|
|
|
|
Response.Redirect("abc.aspx?x=value&y=value&z=value);
mareers
|
|
|
|
|
Thanks a lot.. Let me try with it.
CST
|
|
|
|
|
Respected Sirs
How can I make a inbox for each user who visits my site in ASP.Net using VB.Net
|
|
|
|
|
|
how can I be happy isf i don;t know how to make an inbox and i need it because i need to recive an inportant message and if I don't get it I will not be able to play in moshie monters and I aleady made a monster
Yelmy alvarez
|
|
|
|
|
well you know that not every one is smart you doo doo head
|
|
|
|
|
hi,
in my asp.net application i have one Vb.Net Class library. and I want to make one Dll which contains vb.net class library. now I want to use c# class files in my vb.net class library. So how to do that?
I want to use c# class's methods in my vb.net class.
Please advice.
Thank,
Sun Rays
|
|
|
|
|
OK the question is you have DLL having language VB.Net
then you want to use that dll in your application which is in C# or vice cersa
YES you can do that as DLL contains IL code which is not language specific
Thanks and Regards
Sandeep
If you want something you never had,
do something you have never done!
|
|
|
|
|
Add the reference and import the namespace then use the functions
Thomas
|
|
|
|
|
Sun Rays wrote: I want to use c# class files in my vb.net class library. So how to do that?
You need to add reference to that dll in c# project. And call the methods as you do like in c#. NET uses common language runtime So it doesn't matter your code is in c# or vb.net
|
|
|
|