|
Double click on that control u will get the user name and password with that control name ex: ur control name is userLogin
So u will get userLogin.UserName and userLogin.Password and rest all u know...
|
|
|
|
|
Hey just click on the button you will be redirected to the code page and on button1_Click you can write code what you want ie., allow the user to login to the website after entering the valid Email Id and password.
Regards,
Satips.
|
|
|
|
|
if(username == "you" && password == "oh")
{
// good login
}else{
// bad login
}
ghehe =D
Stef
|
|
|
|
|
iam new to asp.net,please tell me the procedure to create virtual directory.after selecting visualbasic projects and selecting asp.net web application, it is showing a message box "visual studio.net cannot create or open the application"
|
|
|
|
|
Are you using VS.Net 2003 ? If yes, check your IIS is installed and running before creating a web app.
"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
coolestCoder
|
|
|
|
|
yes Mr coolest iam using VS.Net 2003 and configured iis, the problem is ,it is showing a msgbox"upgrade ur asp.net1.0 to asp.net1.1(Recommende)".
How to do this.
thankx
|
|
|
|
|
Hi All,
I am developing a web site where I need to send mails to all admin users if any normal user doesn't login the site for more than 15 days.
Please help me its urgent...
Thanks in advance...
|
|
|
|
|
Learning ASP.NET 2.0 wrote: Learning ASP.NET 2.0
Learning ASP.NET 2.0 wrote: Please help me its urgent...
OK, if you're still learning, why is it urgent ? Or, by learning, do you mean, 'I've taken on a job I don't know how to do' ?
Think this through, it's pretty straightforward. If you want to know how long since someone logged on, what do you need to do ?
And, if you want to run a task that relates to your database, but not to any page on your site, should it be inside the web site, or running as, say, a windows service ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Thank you sir,I know I have to use windows service but I dont know how to start with it.It will be very help to me if u provide me with some good stuff with which I can do this task...
Thanks again..
|
|
|
|
|
I'm not sure what else I could offer, without writing it for you. Your service would call a proc which returns the members who have not logged in for the number of days ( which you'd expose in a config file ), and then read the emails of the admins, and send out the list.
If you want to know how to write a service, try google.
The rest should be straightforward.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Thank you sir, I would like to know how would I use config file as connection and the other related things of config file are in web form where Admin user can set the connection runtime.
So how do I manage this as client doesn't want anything in config file...
|
|
|
|
|
if you need to do this sort of thing without passwords ( i assume that's what you mean by nothing in the config file). You will need to get a job to execute on the server. If you get the database to stick an xml file in a known location then your service can either look for the file at known intervals or listen for changes to the folder it's going to be in.
Are your users using SQL logins to use the webform?
Russell
|
|
|
|
|
Thank you sir, I am using SQL Server 2000 as back end and login name are given to the users. My problem is when when a user doesnt login for 15 days then mail should go to all admin user.Also we have kept a config webform where he can give the connection string and other thing which application wants as global.
Please help me...
Thanks in advance...
|
|
|
|
|
the way i normally do passwords / logins is to create a single user in SQL server that will connect to the database. I store this username / password in the config file and create a table in my database which contains the username and some kind of password derivative. this table can also contain last login date, a flag for disabling the account etc.
as far as i know SQL server 2000 can run scheduled jobs, it also has a SQLMail function so you could get the sql server to send the emails direct.
Russell
|
|
|
|
|
Please help me with Windows Service as I want to do it with Windows Service only...
|
|
|
|
|
first you have to decide how the service is going to log in to the database. It will need to have a username and password to connect to the db. You've already stated that you don't want connection data in the config files so that leaves you with a hard coded username and password in the executable, which is less than perfect.
There's not much to creating a windows service (at least in theory) Create a windows service project and fill in the bits of code that need to be written. There are a few tricks to getting debugging to work while building services, google will help you here. If this is your first service project i would write the code in a console app and then move it into a webservices project when you are 100% happy with it.
Russell
|
|
|
|
|
Thanks yes this is my first Windows Services. Please help me with some code I mean give me idea how do i start writing with the code...
|
|
|
|
|
SELECT *
FROM Categories
WHERE (CategoryName LIKE '%_%')
hi all
When i run this code above. So will all reuslt
Why???
When i client write character _ on textbox search
How can i pervent this. And if character is _ so only view reuslt have character _
|
|
|
|
|
Here[^]
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi,
I am having a problem of getting the primary key or the id of the table I retrieve from the database in the Grid View so that I can delete it. So far I could get the index of the table such as which row I'd selected but it is not the primary key in my database.
Would need some help here, thanks.
J Liang
|
|
|
|
|
U can use the DataKeyNames of GridView to do this.When u write a query then take primary Key also with and store it in DataKyeNames.
Hope this helps u...
|
|
|
|
|
Hi,
I'm not sure how this DataKeyNames work but my code is like this.
For index As Integer = 0 To Me.gvStaff.Rows.Count - 1
Dim cb As CheckBox = CType(Me.gvStaff.Rows(index).FindControl("ckCheck"), CheckBox)
If cb.Checked Then
'I was trying to use the label to check whether it actually grab the value
Me.Label1.Text = Me.gvStaff.DataKeyNames.GetValue(0) 'Not sure it can work like this
End If
Next
J Liang
|
|
|
|
|
Do like this:
strval(0) = "ID"
strSql = "Your Query"
oDS = ObjDB.ExecuteDataSet(strSql) ' Execute your query which return dataset.
GridView1.DataSource = oDS
GridView1.DataKeyNames = strval
GridView1.DataBind()
On Row Command do this:
Dim oGridViewRow As GridViewRow
oGridViewRow = CType(CType(e.CommandSource, Control).NamingContainer, GridViewRow)
objLoanPayOff.LoanPayOffID = CInt(GridViewLoanPayOff.DataKeys(oGridViewRow.RowIndex).Value)
If e.CommandName = "DeleteTrans" Then
With objLoanPayOff
.ID = objLoanPayOff.LoanPayOffID
.UserId = CLng(Session("UserId"))
.FormId = msForm_TYPE.msForm_LOANPAYOFF
End With
objLoanPayOff.DeleteRecord()
errormsg.Text = const_MESSAGE_DELETE_RECORD
BindGridView()
ElseIf e.CommandName = "Edit" Then
Response.Redirect("frmLoanPayOffView.aspx?id=" & objLoanPayOff.LoanPayOffID & "&info=" & e.CommandName)
End If
Hope this help u...
|
|
|
|
|
Do like this:
strval(0) = "ID"
strSql = "Your Query"
oDS = ObjDB.ExecuteDataSet(strSql) ' Execute your query which return dataset.
GridView1.DataSource = oDS
GridView1.DataKeyNames = strval
GridView1.DataBind()
On Row Command do this:
Dim oGridViewRow As GridViewRow
oGridViewRow = CType(CType(e.CommandSource, Control).NamingContainer, GridViewRow)
objLoanPayOff.LoanPayOffID = CInt(GridViewLoanPayOff.DataKeys(oGridViewRow.RowIndex).Value)
If e.CommandName = "DeleteTrans" Then
With objLoanPayOff
.ID = objLoanPayOff.LoanPayOffID
.UserId = CLng(Session("UserId"))
.FormId = msForm_TYPE.msForm_LOANPAYOFF
End With
objLoanPayOff.DeleteRecord()
BindGridView()
ElseIf e.CommandName = "Edit" Then
Response.Redirect("frmLoanPayOffView.aspx?id=" & objLoanPayOff.LoanPayOffID & "&info=" & e.CommandName)
End If
Hope this help u...
|
|
|
|
|
Hi,
Thanks for the code, but what I did was I drag and drop the grid view from the Database Explorer, therefore I have none of those coding above that I can actually 'view' it physically.
The code I show you runs when I click on the delete button. Is there another way of getting the ID? As I tried to get part of your code into mine, I got this error
System.InvalidCastException: Unable to cast object of type 'ASP.staff_list_aspx' to type 'System.Web.UI.WebControls.GridViewRow'
from
oGridViewRow = CType(CType(Me.gvStaff, Control).NamingContainer, GridViewRow)
J Liang
|
|
|
|