Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9249429
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T10:11:10+00:00 2026-06-18T10:11:10+00:00

All I want to do, is insert to a database the username, log in

  • 0

All I want to do, is insert to a database the username, log in time, and IP address of a user when they log in. This would literally take a few lines of code in PHP, but after requesting help in several forums and trying many different solutions it seems to be an impossible task for ASP.

The closest I’ve gotten is adding this to the front aspx page (where it redirects after logging in):

if (Request.IsAuthenticated)

The problem is I can not get it to do an insert after that to save my life. Selects into grid view? No problem. Insert data on page load? No way.

I can not believe that no one has ever encountered this before.

Other notes

  • The site will not load into Visual Studio.

  • I’ve attempted to edit the .cs files in the temp directory, but nothing seems to happen

  • I’m editing the .aspx files in the webroot directory.

  • I’d be more than happy to use straight C#, but I have no idea how to add to the middle of an aspx page

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T10:11:11+00:00Added an answer on June 18, 2026 at 10:11 am

    Sounds like you’re working with a pre-compiled site – so, editing the code is doing nothing?

    If you have complete control over the code, then it should be a simple matter to do an insert into a database in that event handler – we do that all the time. Are you using standard ADO code or trying to use some databound control or something? Just a straight up ADO call would be enough…

    You know… this stuff…

    SqlConnection connection = new SqlConnection(connectionString))
    SqlCommand command = new SqlCommand(queryString, connection);
    
    connection.Open();
    SqlDataReader reader = command.ExecuteQuery();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i want to insert all processes that running into listbox, and also how to
Hi I want to insert all escape characters in a column in MySQL. I
Using VB.Net I want to get a all datagrid cell values, then insert into
I'm doing a database insert script in pycassa. I want to set up a
I want update some of my table in database and want all of these
I want insert in the row from database, array of values as that each
Want to insert all the Rows of a table in a new table with
I want to insert or delete the values in another android applications database from
I want to insert some value from first and second foreach into database, but
I have a list of items that I want to insert into the database

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.