I am a PHP guy, so I am in unfamilar territory, but have done a little work in VB. I am looking for as much help as possible, since I cannot really find a good tutorial. This form has to be accessible, namely Section 508. I would play with this myself, but I don’t have developer rights yet at work, and my personal domain doesn’t support asp.net.
Upon reading, I am confused about the <asp:label> tag. Some pages it looks if the <asp:label> tag is eqivelent to the HTML <label> tag and on others it seems to be used as to print off a variable. The label tag is the main way to make a form accessible, so applying the correct version of the tag is important. Here is my PHP code:
<?php
if(!isset($_POST['btnNext'])){ ?>
<form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>" name="sec">
<label for="guieline">What will your SOW/RFP do?</label>
<select id="guideline" name="guideline">
<option value="doc">Creation of a document</option>
<option value="web">Creation of a website</option>
<option value="other">Other</option>
</select>
<input type="submit" value="Next" id="btnNext"name="btnNext">
</form>
<?php } else {
$guide = $_POST['guideline'];
switch($guide){
case "doc":
echo '<p>You will be creating a document for this SoW or RFP.</p>
<textarea rows="10" cols="75" readonly="readonly" id="doctxt"
onClick="SelectAll(\\'doctxt\\');" onFocus="SelectAll(\\'doctxt\\');">
stuff
</textarea>';break;
case "web":
echo '<p>You will be creating a website for this SoW or RFP.
</p>
<textarea rows="20" cols="75" readonly="readonly" id="webtxt"
onClick="SelectAll(\\'webtxt\\');" onFocus="SelectAll(\\'webtxt\\');">
info
</textarea>';break;
case "other":
echo '<p>Your SoW/RFP may need to have multiple parts.
It will be best if you send the SoW/RFP to <a href="mailto:me">Ryan</a>. I will evaluate your SOW/RFP and let you know what is needed.</p>';break;
}
if($guide!== 'other'){
echo '<p>Please submit your SOW/RFP for review and clearance to
<a href="mailto:me?subject=SOW for Review">Ryan</a>.';
}
}?>
For non-PHP: This says
Check if button if clicked
If not, show form
if clicked, get value from drop down
[LIST]
run that through the switch statement and display whatever
[/LIST]
This form submits to itself, which I read that ASP.NET does this by default.
Oh, ok. I did the code from post 3, and compared it to kitty’s code in post 7. Kitty took out the hidden inputs for simplicity? Should I use VS’s port or should I find a new one?
F5 should start the application in debugging mode. You sure there are no build errors?
I am 100%, opening a new page off the asp template, and typing <p>hey</p> is error free…
No idea why I get the validation parts?
I typed a random port in the box. In Chrome, http://my ip:188 goes to some page but asks to sign in. Going to IP or localhost in IE, it isn’t resolved.
I have xampp on the computer, but xampp/apache/MySQL are not running. i have SOPHOS anti-virus, so that would be 80 I suppose? I found the MS support how to change ports, and made it 90, as per post 16. Still no go, should I try like 1378?
If you hit F5 in visual studio, it should fire up a testing server for you. Provided there are no build errors of course. Otherwise, you need to install IIS on you machine from the list of Windows Features
Crap, I didn’t even think of that. If you do have VS, it already has a built in Web Server. And I think all versions use this feature. When you run your website through VS’s personal server, it will add the server port that will run in your favorite browser. However, when it comes to a ‘front-face’ server (live) you will still need to find out what is using port 80. $100 says it’s your anti-virus program.
It will start its own built in cassini web server and open a browser and look at the server it setup.
Just beware, that sometimes the cassini server behaves slightly differently to that of live servers. But nothing that should worry you. It is mainly the image/root mapping
I replied last time prior to see your code. That is some interesting naming conventions, especially the $ in the id. Can you show me a good tutorial site so I can do post #1?
If you use AssociatedControlID it renders as a <label> if you don’t use AssociatedControlID then it renders as a <span>. Without using AssociatedControlID you are almost always better off using <asp:Literal> as it adds no useless markup.