Need help getting a form to work please

I am essentially a comnplete novice at web programming - I am building a website using a template downloaded from MS as a starting point and then playing with the html and css until it works as I want it!

I am trying to integrate RomanCart into a website I am bulding with Visual Studio Express.
The theory is that having created some product info on the online cart, it generates some code that I can simply cut and paste into my website.

My problem appears to be that it generates an html form and the application I am building is a .aspx app that needs me to have server side code to generate the 'form'.

This is the code I am using

<form action='' method='post'>
        <input type='hidden' name='itemcode' value='BH0001'/>
        <input type='hidden' name='storeid' value='42016'/>
        Bohunt School Blazer : <select name='itemname2'><option value='Boys'>Boys</option><option value='Girls'>Girls</option></select>
       : <select name='itemname3'><option value='Small'>Small</option><option value='Medium'>Medium</option><option value='Large'>Large</option></select>
        <input type='submit' value='Add to basket'/>

I get the expected results displayed in my web page but when I click 'add to basket' button it simply refreshes the page containing the code.

I am guessing that I need to use something like the following code which is in the Contacts page of the template but can't really figure out what should go where, whether I need all of it, some of it........... :(

Any help gratefully received.

<div id="contactForm">
  <fieldset style="width:391px; height: 239px;">
   <legend>Send us your details if you want us to contact you</legend>
   <asp:Label ID="label1" runat="server" AssociatedControlID="txtName"><u>N</u>ame</asp:Label>
   <br />
   <asp:TextBox ID="txtName" runat="server" AccessKey="n" TabIndex="10"
                Width="184px" /><br />
   <asp:Label  ID="label4" runat="server" AssociatedControlID="txtCompanyName"><u>C</u>ompany name</asp:Label><br />
   <asp:TextBox ID="txtCompanyName" runat="server" AccessKey="n" TabIndex="10"
                Width="185px" Height="19px" /><br />
   <asp:Label ID="label3" runat="server" AssociatedControlID="txtZip"><u>P</u>ost code</asp:Label>
            <br />
   <asp:TextBox ID="txtZip" runat="server" AccessKey="p" TabIndex="11"></asp:TextBox>
      <br />
            <br />
   <asp:Label ID="label5" runat="server" AssociatedControlID="txtTelephoneNo"><u>T</u>elephone number</asp:Label><br />
   <asp:TextBox ID="TxtTelephoneNo" runat="server" AccessKey="n" TabIndex="12" /><br />
   <asp:Label ID="label2" runat="server" AssociatedControlID="Email"><u>E</u>mail address</asp:Label><br />
            <asp:TextBox ID="Email" runat="server" AccessKey="e" TabIndex="12"
                Height="19px" Width="185px"></asp:TextBox><br />
  <br />
  <asp:Button ID="SendEmail" runat="server" Text="Submit" TabIndex="15" AccessKey="j" />

1/12/2009 4:13:23 PM 1205 articles. 0 followers. Follow

2 Replies

Similar Articles

[PageSpeed] 52
Get it on Google Play
Get it on Apple App Store

Your question is a bit confusing... Anyway, I would suggest you to start looking at this


"Code, Beer and Music" that's my way of being a programmer!

How to get your Forum Question Answered | Blog | CodeASP.NET
1/12/2009 5:11:27 PM

Hi all

just to let everyone know, I solved my problem like this: 

<form action=http//></form>

         <form action='' method='post'>
        <input type='hidden' name='itemcode' value='BH0001'/>
        <input type='hidden' name='storeid' value='42016'/>
        Bohunt School Blazer : <select name='itemname2'><option value='Boys'>Boys</option><option value='Girls'>Girls</option></select>
       : <select name='itemname3'><option value='Small'>Small</option><option value='Medium'>Medium</option><option value='Large'>Large</option></select>
        <input type='submit' value='Add to basket'/>

<form action=http//></form>

1/18/2009 1:16:37 PM

Similar Artilces:

I cannot get my C#.NET Email Form to work on Godaddy hosting account. Please Help!!!!
Hello;   I have created a contact us page and I am using .NET Mail classes to send the form via email. However I keep getting this error when I upload my info to the hosting server... Request for the permission of type 'System.Net.Mail.SmtpPermission, System, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. Oh and yes, it wont send any emails. here is my code... using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.Web...

Need help to get usb linksys WUSB600N to work (or advice what pci-express to buy that will work)
I have a desktop pc running opensuse 12.1 that I want to connect via linksys wireless usb (WUSB600n). As this is my first experience with the trouble of going online wireless with opensuse I need some help to get it working. With knetworkmanager I can't select a wireless connection, so opensuse doesn't seem to "see" the usb device. I tried running /usr/bin/lsusb and found following entry: Code: -------------------- Bus 001 Device 002: ID 1739:0079 Linksys WUSB600N v2 Dual-band Wireless-N Network Adapter [Ralink RT3572] -------------------- ...

Need help on how to get a DNN DB that works on web to work Local without all menus going to the orginal URL
My programmer is have trouble getting DNN 3.0.13 DB & My Custom app tables that runs on the web with many Portal Aliases to work from localhost.  As soon as you logon or any tab it reverts back to the portal 0 URL. I have it simulated at which has the DB from where I have added Portal Aliases for:,  & localhost/DotNetNuke in from the menu host, Portal, edit portal 0 . At if I select Home tab it takes me to

VS Web Dev Express Ed. Can't run a simple Hello World Web Site. I need help on fixing this error.
Hello everyone, I'm not sure if I posted on a right topic but I'm new to Visual Studio and want to learn to use Visual Studio Web Developer 2008 Express Edition.  Please correct me and direct me to where I should ask for help regarding these matters.I was just trying to simply make a 'Hello World' Website .. Just THAT on my website. A simple Website for me to start learning. Just showing those text on the website. But when I tried to run (debug) the program. This error shows on my browser both on firefox and explorer8... 'Firefox can't establish a connection...

Please Help!! web parts and .net forms
This is a two part question. 1. i have a simple .net form that captures users input and i want to post to another form to show users input and data from a database into a data grid. In keep posting back to the first form. I have action and method set correctly on my first form, no idea why it post to same form. i even have a response.redirect in the click event of the button on the first form. 2. Does anyone know of any good site/web cast that step you through a basic web part for sharepoint 2007 i am using both visual studio 2005 and 2008. I heard that it is like a 12 step ...

I created a website on my localhost with three .mdf files using SQL express but now I get an error when I try to host it on my web server without SQL express. need some help on how to change my connec
An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: An error has occurred whil...

Docking controls to a web form
Hi, With a windows application it is possible to dock and anchor controls to the form. I'm creating a web app and wish to dock and anchor webgrids, panels etc to my webform. I.e. I’ve created a masterpage (template) and want to dock a webgrid to the bottom of it so every webform i create that is based on it has a docked webgrid at the bottom of the webform.  I've tried using the following (I’m using Infragisitics controls but have tried it with VS web controls with no success): UltraWebGrid1.Dock = Dockstyle.bottom I realise that both dock and anchor are members of the...

Please help me with a form/calculator that I cant get to work.
Hello, I am new here, and have come in desparation. I am rebuilding a site for a friend, they wanted it to be a copy of their original site but under their own web address. My problem is I have absolutely no idea how to get the fee calculator to work, all the rest of the site is complete. Here is the original site with the fee calculator on it: and here is the newer version of the site:   I realise I will have to change the file extension of my page to .asp, but thats abo...

Type.GetType does not work in VB.NET but works in C#. VB.NET gurus Please help
Friends,   I am an experienced C# programmer who is working on a VB.NET project now. I am writing different methods covering the following functionalities 1) Take a datareader as input and return an arraylist of class object2) Take an xmlnode (received from a webservice) as input and return an arraylist of class object. The methods are generic methods which take datareader/xmlnode as first parameter and classname (string) as the second parameter. This way it will work trivially. The schema of class object matches with the input (datareader or xmlnode)In C# I used to do th...

Web Matrix Forms problem.. Need Expert Help Please!
Hello.. I'm new to ASP.NET and Web Matrix, and maybe I'm approaching something wrong, but need the experts help here.. I have a web site which is hosted at a remote hosting company.. I also have an SQL server hosted at the same company.. Well, I'm trying to write a form that will use the DB.. When ever I add a Web Control such as a Text Box or Label, etc.. I thought that Web Matrix would automatically put the "<Form runat="server"> around the web server controls, but it doesn't..</form>, so I did so.. Saved the page and since I'm using a remote host, I have...

Nova-TD 500
Hello all, I'm using Opensuse 11.0 and a brand new Hauppage NOVA-TD500 DVB PCI TV-card. Having never used TV cards under Linux before, I don't know where to start - naturally, the driver CD is for Windows as are the instructions! Any help or suggestions at all would be received gratefully. Many thanks Rich -- badger_fruit ------------------------------------------------------------------------ A useful reference: ' - Television with Linux' ( Looks like the TD-500 exists as several versions (chipsets). Hope yo...

Please help updatae to database not working... Oracle and web form
I am very frustrated with my code for updating an oracle database it is coming up witht hte error of  ORA-01008: not all variables boundI have deleted my other parameters for updating to see if I can pin oint the issue and now I am down to one parameter in the update and it still has the error when trying to executenonquery... Please help I figured it out I used the wrong provider.... in my connection...

Need help getting VWD 2005 Express to work with IIS7
OK, so I have both installed - including the optional .NET and ASP parts for IIS. But I have a problem.- I go to "New Web Site"- Location (Browse)- Local IISAll I get is a message saying:"You must be a member of the Administrators group on the local computer to access the IIS metabase. Therefore, you cannot create or open an IIS Web site... blah blah"I would love it if someone could tell me (in simple terms) what am I doing wrong (and how to fix it)? Do I need to install backwards compatibility for IIS6? Or is it something I have done wrong in configuring the IIS (I ...

help needed to get ajax working alongside web developer
Im not sure if this is the right forum, if not could you please redirect me.  Basically after installing AJAX extensions and the toolkit, visual web developer will not let me make use of any of the ajax tools. It all appears to be installed correctly however i dont get the line;  <asp:ScriptManager ID="ScriptManager1" runat="server" /> When opening a new project, if i was to go to 'create website' i dont have the option of 'ASP.Net AJAX-Enabled Website' which im reliably informed by the introduction video to AJAX that I should have. ...

Web resources about - Need help getting a form to work please -

Why Donald Trump probably won’t get Apple to make its ‘damn computers’ in the U.S.
Embed from Getty Images Donald Trump has a long list of things he promises to do in order to “Make America Great Again,” and in a speech Monday ...

Snoop Dogg Bashes Oscars’ Lack of Diversity in Expletive-Laden Video
Rapper Snoop Dogg has resorted to social media to voice his outrage over the lack of diversity in 2016’s Oscar nominations, which failed to recognize ...

Midday open thread: Judge Judy for SCOTUS, Jolly is sad and RIP Glenn Frey
Today’s comic is Jen Sorensen’s Behind the scenes at the Trump girl group tryouts: This will show them … and in related news, Jolly is losing: ...

Warning of 'great challenges' this year, IMF cuts world economic growth forecast
Warning of "great challenges" this year for the world economy, the International Monetary Fund on Tuesday downgraded its forecast for global ...

When It Comes to Housing, San Francisco Is Doing It Wrong, Seattle Is Doing It Right, Cont.
Remember Sonja Trauss? She's the SF-based "deeply eccentric city-government nerd" and housing activist Kathleen mentioned in this recent Slog ...

These Star Wars PS2 games now available individually on PS4
PS2-on-PS4 lineup expands with these three games that were previously only available in the Battlefront bundle.

Netflix teases Pee-wee Herman’s triumphant return in new video
If you grew up as a kid in the 1980s, you likely have fond memories of three seminal figures: Mr. T, Skeletor and Pee-wee Herman. Herman was ...

Twitter outage gets the day off to a rough start
People around the globe were stymied for a while Tuesday as they tried to get onto Twitter, which acknowledged that something was "technically ...

Class Action Lawsuits Filed in Flint Water Crisis
The suits were filed Friday and today by Flint residents.

Resources last updated: 1/19/2016 9:16:55 PM