Hey there!
Im developing website using asp.net c# but Im using some html tags in asp.net c# mixed.
So I rather chose to use html select tag and checkbox tag. Contact.aspx.cs (code behind) doesn't recognise it because it is html tags. Is there a way to recognise html tags in code behind?? Look at below codes (bold):
Contact.aspx:
[B]<select[/B] name="order" multiple="multiple" id="dlist1" onchange="swapImage1()">
[B]<optgroup[/B] label="Sow Seeds of Love">
[B]<option [/B]data-card="32.00" data-memo="62.00" data-tags1="1.80" data-tags4="8.50" data-key="30.00" data-fridge="40.00" data-flower_sachet="----" value="Images/Order_names/SowSeeds/Faith01_yellow.jpg">Faith Card[B]</option>[/B]
[B]<option[/B] data-card="32.00" data-memo="62.00" data-tags1="1.80" data-tags4="8.50" data-key="30.00" data-fridge="40.00" data-flower_sachet="----" value="Images/Order_names/SowSeeds/Grace01_green.jpg">Grace Card[B]</option>
[B] <optgroup>[/B][/B]
[B]<optgroup[/B] label="Goosebumps Vintage A">
[B] <option[/B] data-card="32.00" data-memo="62.00" data-tags1="1.80" data-tags4="----" data-key="30.00" data-fridge="40.00" data-flower_sachet="----" value="Images/Order_names/GoosebVA/GoosebumpVA_blue.jpg">Blue[B]</option>[/B]
[B] </optgroup>[/B]
[B]</select>[/B]
[B]<table>[/B]
[B] <tr>[/B]
[B]<td class="style3">[/B]<input type="checkbox" name="description" value="Card A6" id="description"/> Card A6 (blank)[B]</td>[/B]
[B] </tr>[/B]
[B]</table>
[/B]
<b><u></u>Contact.aspx.cs:</b>
msg += "Name: " + txtName.Text; // fine
msg += "<br>Surname: " + txtSurname.Text; // fine
msg += "<br>Email: " + txtEmail.Text; // fine
msg += "<br>Order:" + HtmlTextWriterTag.Select.ToString("dlist1"); // belong to select tag
msg += "<br>Description:" + HtmlTextWriterTag..... // belong to checkbox tag - how?
mail.Body = msg;
mail.BodyEncoding = System.Text.Encoding.ASCII;
Hope you can help fix it! Your help much appreciated. It is urgent. Thank you!