Forum Community,
Normal
0
false
false
false
EN-US
X-NONE
X-NONE
MicrosoftInternetExplorer4
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman","serif";}
I’ve run into a problem with the use of the FormState
object, and I was hoping someone in the forum could offer some assistance in the matter. The
property defining my FormState dictionary object is listed below:
private Hashtable
_VehicleLicense
{
get
{
return (Hashtable)FormState["_VehicleLicense"];
}
set
{
FormState["_VehicleLicense"] = value;
}
}
I
created a method that will set the FormState dictionary object; I plan to use a
license plate number for the key and a corresponding integer value. The method
definition is listed below:
public void
P2p_LI_EquipmentLicenseNumber_Changed(object
sender, XmlEventArgs e)
{
String engine = MainDataSource.CreateNavigator().SelectSingleNode("/my:myFields/my:P2p_LI_EquipmentLicenseNumber", NamespaceManager).Value;
//Code for setting the FormState object goes here.
}
My
previous code was erroneously invoking the “get” rather than the “set” method.
I’ve tried a number of variations to invoke the set method but have been
unsuccessful. Once my dictionary object has been successfully set, I plan to
update the dictionary object for a license plate using code similar to that
shown below:
if(hashtable.Contains[key]))
{
Hashtable[key] = value
}
Thanks in advance for your assistance; I
sincerely appreciate it :-)
~W