|
Hello Experts
I am doing login page.In that on entering wrong password 5 times i have block that user.
Please can anyone help me in solving this issue
|
|
|
|
|
Set up a count to count how many times a user postbacks to the login page i.e. set a session that runs everytime a user tries to login.
Count the number of times they fail, when it hits 5 stop the user from loggin in.
You could do this by entering a number into a column next to the user's name, this number could expire after 24 hours and the user would be unblocked again
say if you need this explaining
|
|
|
|
|
where can i declare session.
if i declare in pageload it will get initialise each time
|
|
|
|
|
You can keep attempt count in session, check the count before each attempt.
|
|
|
|
|
Hi, I need to Convert HTML Page into PDF Document. Can anyone help me?
Best Regards,
Chetan Patel
|
|
|
|
|
http://www.codeproject.com/KB/showcase/TallComponents.aspx
http://www.html-to-pdf.net/
try these
|
|
|
|
|
There are no inbuilt methods available. You need to purchase some third party components.
|
|
|
|
|
|
i dont understand
Best Regards,
Chetan Patel
|
|
|
|
|
ITextSharp is an opensource PDF component which can help you to dynamically create PDF documents.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
Hi
my problem need to format the date type data in the grid view control like dd/mm/yyyy. need help. thanks in advance.
Have A Nice Day!
Murali.M
|
|
|
|
|
Can you not just convert it to a datetime in the c# and then set the datetime in the format you wish?
|
|
|
|
|
sorry. there is no need for conversion. how to format the datetime data displayed in the gridview. gridview is binded with sqlserver table.
Have A Nice Day!
Murali.M
|
|
|
|
|
You can convert it in the SQL query. Check this[^] to get an idea about using date formats.
|
|
|
|
|
You can do this using DataFormatString Property.
HtmlEncode="false" DataFormatString="{0:dd/MM/yyyy}"
Best Regards,
Chetan Patel
|
|
|
|
|
Hi everybody
I use a site map control in my site, but when I put it, a message appears "The file web.sitemap required by XmlSiteMapProvider does not exist"
How I can deal with this problem?
Thanks alot...
Nour Abdel-Salam...
A Trainer and a Web Developer in Jedda Int'l Computer Center(JICC)
|
|
|
|
|
Check out this discussion thread which shares the similar problem and explores through potential workarounds/solutions:
http://forums.asp.net/p/951128/1290904.aspx#1290904[^]
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
a web.sitemap file is needed to SiteMap control. Create a web.sitemap control on your root.
|
|
|
|
|
Hi guys realy sorry to ask this quest in this forum,
I know little bit in vs2003 in that, to login i have given 2 textbox with that textbox values, i compared my database and given authentication to users,
But i am totally new in vs2005,i saw in that inbuilt login control,
In that login button if i click, i got login_autheticate function,
In that how to get the user entered username and password and compare to my tables?,
I have searched in google,they talked about membership provider,
and some bodies doing in webconfig file itself declared username and password,
I dont want to give like that,
the given username and password have to check with my database table then further process have to be done,
Its possible with that control or not?,This is my question,
how to do that?,
Plzhelp me about that
Thanks & Regards,
NeW OnE,
please don't forget to vote on the post
|
|
|
|
|
|
hi navaneeth thanks for ur reply,
Ya i saw that article but i didnt get any clear idea,
Becoz see this is my code in vs2003,
Function LoginAuthentication() As Boolean
Session("username") = txtuserName.Text
Session("userpwd") = txtPassWord.Text
Dim cmdtextproc As String = "authenticationmain '" & Session("username") & "','" & Session("userpwd") & "'"
sqldad = New SqlDataAdapter(cmdtextproc, sqlconn)
dst = New DataSet
sqldad.Fill(dst, "login")
Dim dt As DataTable = dst.Tables("login")
If dst.Tables("login").Rows.Count > 0 Then
Session("userid") = dt.Rows(0)(0).ToString()
Session("empid") = dt.Rows(0)(1).ToString()
Session("empname") = dt.Rows(0)(2).ToString()
LoginAuthentication = True
dst.Dispose()
sqldad.Dispose()
sqldad = New SqlDataAdapter("authenticationsub '" & Session("userid") & "'", sqlconn)
dst = New DataSet
sqldad.Fill(dst)
Session("MyData") = dst
dtmDate = DateTime.Now()
Dim td As String = dtmDate.ToString("D")
Dim hm As String = 1 & "" & hh & "" & mm & "" & ss
Dim strdate As String = CDate(td)
If Mid(strdate, 2, 1) = "/" Then strdate = "0" & strdate
If Mid(strdate, 5, 1) = "/" Then strdate = Left(strdate, 3) & "0" & Mid(strdate, 4, 6)
strdate = Mid(strdate, 1, 3) & Mid(strdate, 4, 3) & Mid(strdate, 7, 4)
Sqlcmd = New SqlCommand("SubmitHitter '" & Session("ProjectId") & "','" & Session("empid") & "','" & strdate & "','" & hm & "','" & Request.UserHostName() & "'", sqlconn)
Sqlcmd.Connection.Open()
Sqlcmd.ExecuteNonQuery()
Sqlcmd.Connection.Close()
Sqlcmd.Dispose()
Else
LoginAuthentication = False
Session("userid") = ""
Session("userpwd") = ""
Session("empid") = ""
Session("empname") = ""
End If
This cmds running while click my login button,
I am passing the username and pwd to storedprocedure and checking it its given i/p is correct or not,
But in that login control how u can fetch the username textbox id and the password textbox id and how u will pass it to database?,
Thanks & Regards,
NeW OnE,
please don't forget to vote on the post
|
|
|
|
|
Hi,
I have a gridview that contains a textbox.
Now i want to set the default value of that text box to 0.
I have written the following code on the page load for that but is throwin the error "Object reference not set to an instance of an object".
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
((TextBox)(GridView1.FindControl("TextBox1"))).Text = "0";
}
}
Please Help.
Regards,
Pranav Dave
|
|
|
|
|
You can also set it at design time
for example
<ItemTemplate>
<asp:TextBox id="MyTextBox" runat="server" Text="0" />
</ItemTemplate>
Or
If you want to set it at runtime,You can write your code on RowDataBound event of gridview.
On rowDatabound event,find out textbox and set default value 0.
<blockquote class="FQ"><div class="FQA">pranavcool wrote:</div>I have written the following code on the page load for that but is throwin the error "Object reference not set to an instance of an object".
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
((TextBox)(GridView1.FindControl("TextBox1"))).Text = "0";
}
} </blockquote>
This error caused because you did not bind gridview.Rememeber,if you want reference of child control of data control,you must bind first parent control otherwise you can not get child control reference from the parent control
please don't forget to vote on the post that helped you.
|
|
|
|
|
Can any one help me on Browse Capabilities that support all the browser alignment issues......
Subash
|
|
|
|
|