As the original question suggests:
Recording user IP address OnClick and passing this to a database or text file?
I think I've the part about getting the user's IP Address and Browser version and Date/Time sorted as this:
...but then I'm stuck with what to do next.
However, is outputting to a label first really necessary or will it only cause bloat?
I still need:
2. A function or method to pass / Save these details that I have obtained into a database table/fields within a database table.
Let's call the table Users and it will contain 4 fields: ID (Primary Key), IPAddress, BrowserVersion, DateTime.
Hope also that structure is okay?
and
3. A function or method to Save these details to a text file?
NOTE: I don't wish to create a new .txt file every single time a user logs on, but instead to add a new line to (update) an existing .txt file to record the login details.
With this part I'm clueless, as if I'm saving to text file, how do I indicate tabbing/delimit the different sections?
Thanks in advance for any help!
Recording user IP address OnClick and passing this to a database or text file?
I think I've the part about getting the user's IP Address and Browser version and Date/Time sorted as this:
Dim usrBrowserName, usrBrowserVersion
usrBrowserName = Request.Browser.Browser
usrBrowserVersion = Request.Browser.Version
lblBrowserInfo.Text = usrBrowserName & " " & usrBrowserVersion
lblDateTime.Text = DateTime.Now.ToString
...but then I'm stuck with what to do next.
However, is outputting to a label first really necessary or will it only cause bloat?
I still need:
2. A function or method to pass / Save these details that I have obtained into a database table/fields within a database table.
Let's call the table Users and it will contain 4 fields: ID (Primary Key), IPAddress, BrowserVersion, DateTime.
Hope also that structure is okay?
and
3. A function or method to Save these details to a text file?
NOTE: I don't wish to create a new .txt file every single time a user logs on, but instead to add a new line to (update) an existing .txt file to record the login details.
With this part I'm clueless, as if I'm saving to text file, how do I indicate tabbing/delimit the different sections?
Thanks in advance for any help!
Last edited: