Jump to content

Newbie to ASP. Need help with Forms


Guest smartfinds
 Share

Recommended Posts

Guest smartfinds

Hello,We could use some assistance on this matter. We generally work with non-ASP scripts and are just not clear on syntax thus becoming more frustrated. So after some research we decided to get some help on something we think is probably very simple for someone that knows the syntax and command correctly.Here is the original code for that portion of the form: The stored procedure accepts two values. The SearchBy value tells the stored procedure whether the second value is either a two-character State abbreviation or a three-digit ZipLookup. An unsuccessful search will return no records.<br /> <br /> <br /> SearchBy: <asp:TextBox ID="TextBox1" runat="server" Width="39px"></asp:TextBox> 1: by State; 2: by ZipLookup (3-digit Zip Code)<br /> <br /> Value for Search: <asp:TextBox ID="TextBox2" runat="server" Width="100px"></asp:TextBox><br /> <br /> <asp:Button ID="Button1" runat="server" Text="WIGetLocalOrgs" OnClick="Button1_Click" /><br /> <br />We then took this and tried to make it look pretty by giving the user better directions on provding their input. Essentially the form needs to ask them if they want to search by Zip code or by State. If they say Zip code then the response to the server has to be a value of "1" plus the 3-digit zip. If they select State, then the values to the server is a "2" with the two digit state abbreviation. So we thought we would take the original code that was not very pretty and reformat it to something like this. However, we are not putting the right pieces in the right places and probably are over-engineering this thing along with seeing things this with blurry vision at this point.<form id="form1" runat="server"> <p><span class="pageheader">Locate Your Local Chapter </span><strong><br /> </strong> <br /> You can locate your local chapter either by state or by zip code. To search by state, please select State from the drop down menu. Then choose your state from the menu below. </p> <p>To search by zip code, select ZIP CODE from the drop down menu and then enter <span class="style3">THE FIRST 3 DIGITS OF YOUR ZIP CODE</span> then click the Locate My Chapter button. <br /> <br /> <br /> SearchBy: <asp:TextBox ID="TextBox1" runat="server" Width="39px"></asp:TextBox> <label> <select name="select"> <option selected="selected">State</option> <option>Zip Code</option> </select> </label> 1: by State; 2: by ZipLookup (3-digit Zip Code)<br /> <br /> Enter Zip or Here: <asp:TextBox ID="TextBox2" runat="server" Width="100px"></asp:TextBox> or select a state <select name="state" size="1"> <option value="AK">AK</option> <option value="AL">AL</option> <option value="AR">AR</option> <option value="AZ">AZ</option> <option value="CA">CA</option> <option value="CO">CO</option> <option value="CT">CT</option> <option value="DC">DC</option> <option value="DE">DE</option> <option value="FL">FL</option> <option value="GA">GA</option> <option value="HI">HI</option> <option value="IA">IA</option> <option value="ID">ID</option> <option value="IL">IL</option> <option value="IN">IN</option> <option value="KS">KS</option> <option value="KY">KY</option> <option value="LA">LA</option> <option value="MA">MA</option> <option value="MD">MD</option> <option value="ME">ME</option> <option value="MI">MI</option> <option value="MN">MN</option> <option value="MO">MO</option> <option value="MS">MS</option> <option value="MT">MT</option> <option value="NC">NC</option> <option value="ND">ND</option> <option value="NE">NE</option> <option value="NH">NH</option> <option value="NJ">NJ</option> <option value="NM">NM</option> <option value="NV">NV</option> <option value="NY">NY</option> <option value="OH">OH</option> <option value="OK">OK</option> <option value="OR">OR</option> <option value="PA">PA</option> <option value="RI">RI</option> <option value="SC">SC</option> <option value="SD">SD</option> <option value="TN">TN</option> <option value="TX">TX</option> <option value="UT">UT</option> <option value="VA">VA</option> <option value="VT">VT</option> <option value="WA">WA</option> <option value="WI">WI</option> <option value="WV">WV</option> <option value="WY">WY</option></select><br /> <br /> <asp:Button ID="Button1" runat="server" Text="Locate My Local Chapter" OnClick="Button1_Click" /> <br />Any help would be greatly appreciated. Thanks so much.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...