How do I code to have the buuton_click fill in my textfields into a table after clicking the button. I created a table in SQL and I need this button click to call the table and fill in the three text fields. both webpage and button code is here.

using
System;
using
System.Collections.Generic;
using
System.Linq;
using
System.Web;
using
System.Web.UI;
using
System.Web.UI.WebControls;
namespace
Region_V_project_workshop
publicpartialclassWebForm5:
System.Web.UI.Page
protectedvoidPage_Load(objectsender,
EventArgse)
protectedvoidButton1_Click(objectsender,
EventArgse)
if you need my webpage code please let me know

Below is an example of executing a parameterized INSERT statement using SqlClient.
protected void Button1_Click(objectsender, EventArgse)
var connection = new SqlConnection(connectionString);
var command = new SqlCommand("INSERT INTO dbo.YourTable (FirstName, LastName) VALUES (@FirstName, @LastName);", connection);
command.Parameters.Add("@FirstName", SqlDbType.VarChar, 50).Value = textBoxFirtName.Text;
command.Parameters.Add("@LastName", SqlDbType.VarChar, 50).Value = textBoxLastName.Text;
connection.Open();
command.ExecuteNonQuery();
connection.Close();
Dan Guzman, SQL Server MVP, http://www.dbdelta.com

Similar Messages

  • Lightroom 4 crashes when trying to open the slideshow module. I spent over three hours with both Adobe and Apple tech support and we know it is a permission issue but have not been able to get it solved.  It started with the last upgrade to 10.8

    Lightroom 4 crashes when trying to open the slideshow module. I spent over three hours with both Adobe and Apple tech support and we know it is a permission issue but have not been able to get it solved.  It started with the last upgrade to 10.8

    Back up all data.
    This procedure will unlock all your user files (not system files) and reset their ownership and access-control lists to the default. If you've set special values for those attributes on any of your files, they will be reverted. In that case, either stop here, or be prepared to recreate the settings if necessary. Do so only after verifying that those settings didn't cause the problem. If none of this is meaningful to you, you don't need to worry about it.
    Step 1
    If you have more than one user account, and the one in question is not an administrator account, then temporarily promote it to administrator status in the Users & Groups preference pane. To do that, unlock the preference pane using the credentials of an administrator, check the box marked Allow user to administer this computer, then reboot. You can demote the problem account back to standard status when this step has been completed.
    Triple-click the following line to select it. Copy the selected text to the Clipboard (command-C):
    { sudo chflags -R nouchg,nouappnd ~ $TMPDIR.. ; sudo chown -Rh $UID:staff ~ $_ ; sudo chmod -R u+rwX ~ $_ ; chmod -R -N ~ $_ ; } 2> /dev/null
    Launch the Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
    Paste into the Terminal window (command-V). You'll be prompted for your login password, which won't be displayed when you type it. You may get a one-time warning not to screw up. If you don’t have a login password, you’ll need to set one before you can run the command. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator.
    The command will take a noticeable amount of time to run. Wait for a new line ending in a dollar sign (“$”) to appear, then quit Terminal.
    Step 2 (optional)
    The first step should give you usable permissions in your home folder. This step will restore special attributes set by OS X on some user folders to protect them from unintended deletion or renaming. You can skip this step if you don't consider that protection to be necessary.
    Boot into Recovery by holding down the key combination command-R at startup. Release the keys when you see a gray screen with a spinning dial.
    When the OS X Utilities screen appears, select
    Utilities ▹ Terminal
    from the menu bar. A Terminal window will open.
    In the Terminal window, type this:
    resetpassword
    That's one word, all lower case, with no spaces. Then press return. A Reset Password window will open. You’re not  going to reset a password.
    Select your boot volume ("Macintosh HD," unless you gave it a different name) if not already selected.
    Select your username from the menu labeled Select the user account if not already selected.
    Under Reset Home Directory Permissions and ACLs, click the Reset button.
    Select
     ▹ Restart
    from the menu bar.

  • I delete some emails ,there are moved to trash . I delete them from trash folder too and they still appear in a folder called 'all messages". I repeat the same actions and after a while they appear again!what should i do to delete them permanently??

    I delete some emails ,there are moved to trash . I delete them from trash folder too and they still appear in a folder called 'all messages". I repeat the same actions and after a while they appear again!what should i do to delete them permanently??

    If you are using Apple's Mail app 6.5 is the latest version irrespective of what a previous poster says. It does sound though that you are using a gmail account online via a web browser. Please confirm and fill in missing information.

  • HT5312 what is the 100% guaranteed way to reset the security questions? i forgot how the answers were typed specifically and i need help. there is no email address for them to send the answers to for some reason, and the "change payment method" idea didnt

    somebody please know something. for some reason apple doesnt want problems to be settled over email and everything has to be fixed over the phone, but i hate calling people and would rather email. so is there a way or do i have to call them?

    If you don't have a rescue email address (you won't be able to add one until you can answer your questions) then you will need to contact iTunes Support / Apple in your country to get the questions reset - which will be by phone as they need to confirm your id and that it's your account
    Contacting Apple about account security : http://support.apple.com/kb/HT5699
    You can try contacting them via email via this link, but you might have to wait 24 to 48 hours for a reply, and they then might just tell to you to use the HT5699 link above : https://ssl.apple.com/emea/support/itunes/contact.html

  • I bough a new imac, this haven't dvd burner, i bought a external dvd burner but the imac havent a idvd and i need this program, no other one, how to download this and install?

    i bough a new imac, this haven't dvd burner, i bought a external dvd burner but the imac havent a idvd and i need this program, no other one, how to download this and install?

    Hi
    how to download this and install?
    There are no free DownLoads !
    There are no legal DownLoads at all !
    If there is no iDVD on Your Mac (and it's not on newer Macs as Apple discarded it) then You need a program that can do this.
    Your Mac can burn CDs and DVDs - BUT DVD as Data-DVDs not as Video-DVDs - they need a program to be encoded and STRUCTURED as such.
    • iDVD is part of the boxed version of iLife'11 and can only be bought outside Apple as on Amazon and e-bay
    • DVD Studio pro - Part of FinalCut Studio Pro bundle - this to has expired and can only be bought second handed. (High price and tough learning Curve - but best ever done.)
    • Roxio Toast™ - Not as elegant as iDVD - but has many other positive additions (I like it as 10-Pro incl BD-component) (now version 11)
    • Burn - only free alternative I know of on internet. Very simple - Just for doing a plain Video-DVD
    Burn http://www.digital-digest.com/software/Burn.html
    only You can buy from Apple is
    • FinalCut Pro-X which also can burn to DVD but without any nice themes.
    AppleMan1958
    You can also buy Compressor from Apple for $50 US. It will also create DVD and BluRay but without the nice themes.
    Yours Bengt W

  • HT201442 i have updated my iphone 4s to the new ios 7.1 ,but it stuck on active mode and it needs my account because i used "find my iphone" before ,but the problem is my account is banned by apple i dont know why ,so what should i do ?

    i have updated my iphone 4s to the new ios 7.1 ,but it stuck on active mode and it needs my account because i used "find my iphone" before ,but the problem is my account is banned by apple i dont know why ,so what should i do ?

    You need to update iTunes to 11.1 on your PC

  • I bought my I pod touch 3-4 months ago and I got this message all of a sudden, it said something along the lines of provisonal complete_Distrib... will expire in 30 days. What is this it's under setting-general-Profile should I be worried?

    I bought my I pod touch 3-4 months ago and I got this message all of a sudden, it said something along the lines of provisonal complete_Distrib... will expire in 30 days. What is this it's under setting-general-Profile should I be worried? Should I just let it expire.

    Unless you have a company or school iPod, that profile was installed by an app you installed. It is likely that the app will no longer function when that date is reached. You can Google the name of the profile and that may provide some more information.

  • I recently inherited a restored iPhone 5 from my uncle and its needs a sim to be activated, could i use my friends sim just to activate my iPhone and then give the sim back once its activated without affecting his contract and later on get a sim ?

    I recently inherited a restored iPhone 5 from my uncle and its needs a sim to be activated, could i use my friends sim just to activate my iPhone and then give the sim back once its activated without affecting his contract and later on get a sim for myself and a contract for me and it all be normal??? Thanks

    The phone MUST have a SIM present in order for activation to complete. The process will not finish otherwise.
    For the OP:
    If the iPhone 5 is locked to a carrier, you must use a SIM from that same carrier. Otherwise I think you would be OK borrowing the SIM to activate the phone.
    ~Lyssa

  • TS3297 Tried to copy a movie from my iTunes account to my iPhone and keep getting this message--.  iTunes could not copy "L.A." to the iPhone "Michael's iPhone" because of a timeout occurred.

    Tried to copy a movie from my iTunes account to my iPhone and keep getting this message…….  iTunes could not copy "L.A." to the iPhone "Michael's iPhone" because of a timeout occurred.

    I completely understand what is happening. I know that you are connected to the Internet. I made the suggestion because I have seen it work in similar circumstances. The Apple iTunes servers can be a bit fussy about things and sometimes rebooting the router clears up this miscommunication between iTunes and your network.
    Have you tried signing into your account and then try to sync again. Go to Store>View Account. You will have to enter your password. Then try to sync again. Or try signing out completely in Store>Sign out. Quit iTunes, sign in again and then try to sync again.
    Sometimes refreshing settings will help clear up weird problems.

  • I am shooting aerial video with a GoPro H3  at 1080p 30fps and would like to edit videos and give them to my clients to use in as much media as possible for their advertising and marketing needs.  I would like to give it to them at the highest quality all

    I am shooting aerial video with a GoPro H3+ at 1080p 30fps and would like to edit videos and give them to my clients to use in as much media as possible for their advertising and marketing needs.  I would like to give it to them at the highest quality allowed.  What form should I save it in 'Publish and Share'?  I have Premier Elements 12.

    KM
    Can we assume that your 1080p30 is an AVCHD.mp4 file or other?
    You manually or the project automatically should set the project preset to
    NTSC
    DSLR
    1080p
    DSLR 1080p30 @29.97
    (If your frame rate is really 30 instead of 29.97, then go with DSLR 1080p30 instead of DLSR 1080p30 @29.97)
    See the following link for setting the project preset manually
    http://www.atr935.blogspot.com/2013/04/pe11-accuracy-of-automatic-project.html
    For your export
    Publish+Share
    Computer
    AVCHD
    with Presets = MP4 - H.264 1920 x 1080p30
    Please let us know if you have further questions on this or need clarification on anything written.
    Thank you.
    ATR

  • When I sign into iTunes for updates, a secondary username appears and I need to enter a password. I am not familiar with the second user name. Any Suggestions?

    When I sign into iTunes for updates, a secondary username appers and I need to enter a password. I am not familiar with the second username. Any suggestions?

    Are you using iTunes on your iPad or the actual program on a Mac/PC?
    If you are using on your iPad check the ID being used by going to Settings>iTunes & App Store if the Apple ID displayed isn't yours tap it and select Sign Out then sign in with your own Apple ID.
    If you are referring to iTunes on a Mac/PC select the Store Menu and check the Account Name next to the View Account text, if this isn't you select the Sign Out option directly above it then Sign In with the relevant credentials.
    Regards,
    Steve

  • I installed a new SSD drive in my computer and now Adobe Creative Suite Web Premium says I don't have a license. I have license. It was very expensive. I am disabled now, and I need this software working.

    I installed a new SSD drive in my computer and now Adobe Creative Suite Web Premium says I don't have a license. I have license. It was very expensive. I am disabled now, and I need this software working. Adobe Acrobat has been a primary tool for accommodating memory problems after a brain injury. (A car ran me down while I was out getting exercise.) I installed the SSD because I needed my management of PDF files to run faster. I called tech support for help when the software first stopped working, but they needed me to give them a number from my original disks. Because of my disability, I've been having someone come in to clean, and the shelves where I kept my software packages were cleared. I've been hunting for them ever since, but I can't look for them myself for very long at a time. Today I finally found them, but now I can't seem to contact tech support. What happened? I don't want to delete my old files because I need the setup to remain unchanged, because I don't do well with changes. I think all I should need is to have someone located the license file on drive E: and move it to wherever it is needed on the SSD drive, but I don't know what to look for.

    Tech support is not normally available on weekends.  You should contact them as soon as the weekend passes and pick up where you left off with them.

  • Hello , how to buy online? , and i need this license to my company!

    hello , how to buy online? , and i need this license to my company!

    Cloud Plans https://creative.adobe.com/plans
    -Special Photography Plan includes Photoshop & Lightroom & Bridge & Mobile Lightroom
    -Special Photography Plan includes 2Gig of Cloud storage (not the 20Gig of the full plan)
    -http://helpx.adobe.com/creative-cloud/faq/mobileapps.html
    -http://helpx.adobe.com/photoshop/kb/differences-photoshop-creative-cloud-photography.html
    -and subscription terms http://www.adobe.com/misc/subscription_terms.html
    -what is in the entire Cloud http://www.adobe.com/creativecloud/catalog/desktop.html
    -http://www.adobe.com/products/catalog/mobile._sl_id-contentfilter_sl_catalog_sl_mobiledevi ces.html

  • Since switching to Firefox this week, when I click on a hyperlink in an e-mail in Outlook, I get this message, "General failure. An error occurred in sending the command to the application." It doesn't open a new window or do anything.

    Since switching to Firefox this week, when I click on a hyperlink in an e-mail in Outlook, I get this message, "General failure. An error occurred in sending the command to the application." It doesn't open a new window or do anything. Any work around to fix this?

    See this lnk for a fix, it worked for me!
    http://www.pcworld.com/article/200103/fix_outlook_general_failure_error_for_email_links.html

  • Is it possible to show/hide a result text field only if another Text field is visible and has content?

    Hi
    Please could someone tell me if it is possible to make a text field visible only if another text field is visible and has content?
    I have this which works for the content part, but sometimes the field is hidden, so the script must not apply.
    var v1 = getField("Text1").value;
    event.target.display = v1 !== ""  ?
    display.visible : display.hidden;
    What I need is something along the lines of:
    var v1 = getField("Text1").value;
    event.target.display = (v1 !== "" && v1!=="Hidden") ?
    display.visible : display.hidden;
    Thanks for any advise.

    Thanks for the hints which led me to the right solution. I created a query to check if the trigger for the visibility was there or not, and this works. The script I have used is:
    var v1 = getField("Text1").value;
    var v2 = getField("Checkbox").value;
    var v3 = getField("Text2").value;
    event.target.display = (v1=="" || v3=="" && v2=="On" ) ?
    display.visible : display.hidden;

Maybe you are looking for

  • RAID mirror with software utility caused kernel panic every time

    Using disc utility to make a mirror of 2 drives, click create and i get kernel panic and have to power off machine. if i try to start the machine with either of the two disks in it (together or individually) i get same kernel panic and have to power

  • No sound on OSX!

    Hello guys, I am here to try to solve a problem that has been going for months! So I have a mac book pro, and a few months ago an audio jack broke inside the audio port. At this point I cannot connect any headphones in my computer, so the only option

  • Linking Sales Promotions to Statistical Internal Orders

    We have two kinds of promotions here. a) Consumer Promotion - reduced price for a particular period b) Trade Promotion - Free goods - buy 10 get one free. We are creating these promotion through standard SAP route with a validity period, and these ge

  • As3 get position from object in other object

    please i need help, i have a object inside this object i have other objects, (MC.Part1,MC.Part2,MC.Part3...etc), the MC rotate in the escene, that with interpolation, with the tools of flash,that is ok, the object parent rotate and the childs with he

  • Minimum size of SGA for the recovery catalog db ?

    I've created a recovery catalog database and by default the total size of the SGA is 180MB. Problem is, there isnt' much memory on development server to run the target and recovery catalog database (catdb). Would it be possible to startup catdb with