I am trying to create a basic macro that encapsulates a form and the ability to email the details entered into it. It works fine for Textboxes, but for some reason the DropDownLists take the first value in the list of options. I've been working on this for hours and seem to've tried everything, so hopefully someone can suggest a solution. I am using Umbraco 4.0.3 and unfortunately upgrade is not an option. My reduced code is as follows:
CorpRefundForm.ascx:
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="CorpRefundForm.ascx.cs" Inherits="umbracowebsitewizard_site.Usercontrols.CorpRefundForm" %>
Sorry, I completely forgot about this post! The problem was JS library was doing something to the Dropdown that caused it to stop working, so I removed it. Unfortunately as it has been removed I can't remember what it was, but anyone with this problem should try disabling JS!
Getting SelectedValue from a DropDownList
I am trying to create a basic macro that encapsulates a form and the ability to email the details entered into it. It works fine for Textboxes, but for some reason the DropDownLists take the first value in the list of options. I've been working on this for hours and seem to've tried everything, so hopefully someone can suggest a solution. I am using Umbraco 4.0.3 and unfortunately upgrade is not an option. My reduced code is as follows:
CorpRefundForm.ascx:
CorpRefundForm.ascx.cs
CorpRefundForm.ascx.designer.cs:
Any help is greatly appreciated.
Hi Dean,
What happens if you switch these two:
frm_dropdown.SelectedValue and frm_dropdown.Text
to
frm_dropdown.SelectedItem.Value and frm_dropdown.SelectedItem.Value
? :-)
Sorry, I completely forgot about this post! The problem was JS library was doing something to the Dropdown that caused it to stop working, so I removed it. Unfortunately as it has been removed I can't remember what it was, but anyone with this problem should try disabling JS!
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.