State of Dynamically Created controls on PostBack?

Discussion in 'ASP .Net' started by Amelyan, May 12, 2005.

  1. Amelyan

    Amelyan Guest

    How can I get state of dynamically created controls (RadioButton, CheckBox,
    TextBox.Text) on post back when I click submit button?

    The only way I know is by traversing Response.Form enumberator;
    Response.Form.GetEnumerator(), etc. while, identifying specific controls by
    programmatically assigned unique id (e.g. MyButton_AnswerID_123).

    However, I am not sure if that is the proper way. What is the common
    practice?

    Thanks,
    -Amelyan
    Amelyan, May 12, 2005
    #1
    1. Advertising

  2. Amelyan

    Lucas Tam Guest

    "Amelyan" <> wrote in
    news::

    > How can I get state of dynamically created controls (RadioButton,
    > CheckBox, TextBox.Text) on post back when I click submit button?
    >
    > The only way I know is by traversing Response.Form enumberator;
    > Response.Form.GetEnumerator(), etc. while, identifying specific
    > controls by programmatically assigned unique id (e.g.
    > MyButton_AnswerID_123).
    >
    > However, I am not sure if that is the proper way. What is the common
    > practice?


    On postback, recreate the cotrols - then you can access the previous
    viewstate of the controls.

    --
    Lucas Tam ()
    Please delete "REMOVE" from the e-mail address when replying.
    http://members.ebay.com/aboutme/coolspot18/
    Lucas Tam, May 12, 2005
    #2
    1. Advertising

  3. Amelyan

    Guest

    Lucas Tam wrote:
    > "Amelyan" <> wrote in
    > news::
    >
    > > How can I get state of dynamically created controls (RadioButton,
    > > CheckBox, TextBox.Text) on post back when I click submit button?
    > >
    > > The only way I know is by traversing Response.Form enumberator;
    > > Response.Form.GetEnumerator(), etc. while, identifying specific
    > > controls by programmatically assigned unique id (e.g.
    > > MyButton_AnswerID_123).
    > >
    > > However, I am not sure if that is the proper way. What is the

    common
    > > practice?

    >
    > On postback, recreate the cotrols - then you can access the previous
    > viewstate of the controls.
    >
    > --
    > Lucas Tam ()
    > Please delete "REMOVE" from the e-mail address when replying.
    > http://members.ebay.com/aboutme/coolspot18/


    What I do is traverse the source of the controls...

    I generate the controls with an XSLT stylesheet that produces the
    output from XML read dynamically from a database. I read the template
    again from the database on post back, and traverse the results there.
    I isolate particular controls using the Page.FindControl method.

    That way, if I'm only looking for some of them, I don't have to read
    through the whole response.
    , May 12, 2005
    #3
  4. Amelyan

    Amelyan Guest

    Do you have a simple examle of generating the controls with an XSLT
    stylesheet that produces the output from XML read dynamically from a
    database, then reading the template again from the database on post back,
    and traversing the results there, and isolating particular controls using
    the Page.FindControl method?

    Thanks,
    -Amelyan

    <> wrote in message
    news:...
    >
    > Lucas Tam wrote:
    >> "Amelyan" <> wrote in
    >> news::
    >>
    >> > How can I get state of dynamically created controls (RadioButton,
    >> > CheckBox, TextBox.Text) on post back when I click submit button?
    >> >
    >> > The only way I know is by traversing Response.Form enumberator;
    >> > Response.Form.GetEnumerator(), etc. while, identifying specific
    >> > controls by programmatically assigned unique id (e.g.
    >> > MyButton_AnswerID_123).
    >> >
    >> > However, I am not sure if that is the proper way. What is the

    > common
    >> > practice?

    >>
    >> On postback, recreate the cotrols - then you can access the previous
    >> viewstate of the controls.
    >>
    >> --
    >> Lucas Tam ()
    >> Please delete "REMOVE" from the e-mail address when replying.
    >> http://members.ebay.com/aboutme/coolspot18/

    >
    > What I do is traverse the source of the controls...
    >
    > I generate the controls with an XSLT stylesheet that produces the
    > output from XML read dynamically from a database. I read the template
    > again from the database on post back, and traverse the results there.
    > I isolate particular controls using the Page.FindControl method.
    >
    > That way, if I'm only looking for some of them, I don't have to read
    > through the whole response.
    >
    Amelyan, May 12, 2005
    #4
  5. Amelyan

    Guest

    yes I do, as a matter of fact. Although explaining it is a bit heavy,
    so I'll give it my best shot:

    The CreateForm() reads the template which is returned as a FOR XML
    AUTO query from the SQL server. It transforms it into ASP.NET code by
    applying the stylesheet, then ParseControl will actually render it on
    the page from a text stream. Then, ProcessResults reads the template
    again, and walks down through it. In this example, it's building an
    XML document from the results, but you needn't do that if you don't
    want to. I just wrote this XML in, XML out so that I can change the
    backend at some point in the future if I decide to dump SQL server.
    Then all I'd have to do is change the DB calls to file reads or
    whatever.

    Notice that you can't use ParseControl to insert custom user controls
    (peoplepicker and duedatepicker), you have to have a placeholder in
    there, and substitute your controls in as childcontrols after the fact.

    I've cut a bit of the end off my ProcessResults but you get the idea of
    what you're asking from this here.

    I have for you the template from the database, the xslt stylesheet, and
    the code I used

    Some of this create survey was from a completely different form I had,
    so the comments and switch statements might not apply to this template.
    It just goes to show you how little you have to do to the code to
    completely change the form.

    Have fun, and post back if you have some questions.
    -----------------------------------------Template Document from the
    Database ----------------
    <ItemType ITId="1" ITName="New Employee" ITAppLevel="6">
    <TypeTemplate TTId="1" TTNo="1" ITId="1" TTName="Name" TTSize="100"
    TTDesc="Name of the new employee."/>
    <TypeTemplate TTId="2" TTNo="2" ITId="1" TTName="Locator Code"
    TTSize="10" TTDesc="Locator code of the new employee."/>
    <TypeTemplate TTId="5" TTNo="3" ITId="1" TTName="Contractor"
    TTSize="5" TTDesc="Is this person a contractor?"/>
    <TypeTemplate TTId="6" TTNo="4" ITId="1" TTName="Start Date"
    TTSize="12" TTDesc="Indicate the start date."/>
    <TypeTemplate TTId="26" TTNo="5" ITId="1" TTName="Badge" TTSize="12"
    TTDesc="Specify the badge number of the new employee (if known)"/>
    <TypeTemplate TTId="27" TTNo="6" ITId="1" TTName="Manager"
    TTSize="12" TTDesc="Who will be the manager of the new employee?"/>
    </ItemType>
    <ItemType ITId="2" ITName="Directory Access" ITAppLevel="1">
    <TypeTemplate TTId="7" TTNo="1" ITId="2" TTName="Directory"
    TTSize="255" TTDesc="What directory are you requesting access to?"/>
    <TypeTemplate TTId="8" TTNo="2" ITId="2" TTName="Access Level"
    TTSize="20" TTDesc="What level of access are you requesting to this
    directory?"/>
    <TypeTemplate TTId="21" TTNo="3" ITId="2" TTName="PMt" TTSize="12"
    TTDesc="Specify the Data Owner of this area."/>
    <TypeTemplate TTId="42" TTNo="4" ITId="2" TTName="Directory Type"
    TTSize="128" TTDesc="Specify the type of Directory"/>
    </ItemType>
    <ItemType ITId="4" ITName="Unix Account" ITAppLevel="2">
    <TypeTemplate TTId="29" TTNo="1" ITId="4" TTName="Host Name"
    TTSize="25" TTDesc="On which unix host are you requesting an
    account?"/>
    </ItemType>
    <ItemType ITId="5" ITName="SecurID" ITAppLevel="6">
    <TypeTemplate TTId="28" TTNo="1" ITId="5" TTName="Used For"
    TTSize="32" TTDesc="WWW Timesheet if for offsite timesheets only. All
    others choose VPN."/>
    </ItemType>
    <ItemType ITId="6" ITName="CostPoint Access" ITAppLevel="2">
    <TypeTemplate TTId="39" TTNo="1" ITId="6" TTName="Type of Access"
    TTSize="64" TTDesc="Admin or Client level access?"/>
    </ItemType>
    <ItemType ITId="7" ITName="Create New FileNET Area" ITAppLevel="2">
    <TypeTemplate TTId="31" TTNo="1" ITId="7" TTName="Area Requested"
    TTSize="2048" TTDesc="To which area in FileNET are you requesting
    access?"/>
    </ItemType>
    <ItemType ITId="8" ITName="ClearCase Client Install" ITAppLevel="2">
    <TypeTemplate TTId="33" TTNo="1" ITId="8" TTName="Type of
    Installation" TTSize="12" TTDesc="Select whether this will be a Basic
    or Developer installation."/>
    </ItemType>
    <ItemType ITId="10" ITName="VSS/VI" ITAppLevel="2">
    <TypeTemplate TTId="40" TTNo="1" ITId="10" TTName="Type of Request"
    TTSize="64" TTDesc="Vss or VI?"/>
    <TypeTemplate TTId="41" TTNo="2" ITId="10" TTName="Full Path of Area
    Requested" TTSize="128" TTDesc="Specify the project or area to which
    you are requesting rights."/>
    <TypeTemplate TTId="43" TTNo="3" ITId="10" TTName="Need Client
    Install" TTSize="64" TTDesc="Check &apos;yes&apos; if you need the
    client installed"/>
    <TypeTemplate TTId="44" TTNo="4" ITId="10" TTName="Need User Account"
    TTSize="64" TTDesc="Check &apos;yes&apos; if you need a user account
    for VSS or VI"/>
    </ItemType>
    <ItemType ITId="11" ITName="Local Administrator" ITAppLevel="14">
    <TypeTemplate TTId="10" TTNo="1" ITId="11" TTName="Justification"
    TTSize="2048" TTDesc="Specify a justification for requesting local
    admin rights."/>
    <TypeTemplate TTId="11" TTNo="2" ITId="11" TTName="Machine Tag"
    TTSize="10" TTDesc="The tag number of the machine to which you are
    requesting local admin rights."/>
    </ItemType>
    <ItemType ITId="12" ITName="FTP Access" ITAppLevel="2">
    <TypeTemplate TTId="12" TTNo="1" ITId="12" TTName="Description"
    TTSize="2048" TTDesc="Any information relevant to the FTP directory
    access or creation request."/>
    <TypeTemplate TTId="32" TTNo="1" ITId="12" TTName="Directory or
    Project" TTSize="2048" TTDesc="Enter desired name for directory
    creation, or specify the project to which you need access."/>
    </ItemType>
    <ItemType ITId="13" ITName="Outlook Email" ITAppLevel="2">
    <TypeTemplate/>
    </ItemType>
    <ItemType ITId="14" ITName="Unix Email" ITAppLevel="2">
    <TypeTemplate/>
    </ItemType>
    <ItemType ITId="15" ITName="Mail Forward" ITAppLevel="10">
    <TypeTemplate TTId="13" TTNo="1" ITId="15" TTName="Forward
    Destination" TTSize="50" TTDesc="Specify the email address to which you
    are requesting your email be forwarded."/>
    </ItemType>
    <ItemType ITId="16" ITName="Private User Folder" ITAppLevel="2">
    <TypeTemplate TTId="14" TTNo="1" ITId="16" TTName="Action"
    TTSize="16" TTDesc="Add or remove this folder?"/>
    </ItemType>
    <ItemType ITId="17" ITName="Shared Project Folder" ITAppLevel="2">
    <TypeTemplate TTId="15" TTNo="1" ITId="17" TTName="Action Required"
    TTSize="16" TTDesc="Specify what action this request requires."/>
    <TypeTemplate TTId="17" TTNo="2" ITId="17" TTName="Primary Data
    Owner" TTSize="256" TTDesc="Specify who will be responsible for the
    data stored in this area."/>
    <TypeTemplate TTId="18" TTNo="3" ITId="17" TTName="Backup Data Owner"
    TTSize="256" TTDesc="Specify an alternate point of contact."/>
    <TypeTemplate TTId="19" TTNo="4" ITId="17" TTName="Project Name"
    TTSize="128" TTDesc="What project will this area be associated with?"/>
    <TypeTemplate TTId="25" TTNo="5" ITId="17" TTName="Folder Name"
    TTSize="25" TTDesc="Specify desired folder name. We may remove spaces
    and special characters if necessary."/>
    </ItemType>
    <ItemType ITId="18" ITName="Specific Description" ITAppLevel="0">
    <TypeTemplate TTId="30" TTNo="1" ITId="18" TTName="Details"
    TTSize="2048" TTDesc="Add any detail you could not specify in other
    areas of the request."/>
    </ItemType>
    ------------------------------------------StyleSheet------------------------------------------------
    <?xml version="1.0" encoding="UTF-8" ?>
    <xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:asp="remove"
    xmlns:uc1="remove">

    <xsl:eek:utput method="xml" indent="yes" encoding="utf-8"
    omit-xml-declaration="yes"/>
    <xsl:template match="/">

    <table rules="all" border="1" cellpadding="2">

    <xsl:for-each select="//ItemType">
    <tr>
    <td align="left">
    <asp:Label id="Granter_{position()}" runat="server" >
    <b>
    <xsl:value-of select="@ITName" />
    </b>
    </asp:Label>
    </td>
    </tr>
    <tr>
    <xsl:if test="./TypeTemplate[@TTName]">
    <td valign="top">
    <table rules="all" cellpadding="2" width="100%">
    <xsl:for-each select="TypeTemplate[@TTName]">
    <tr>
    <td align="center">
    <xsl:value-of select="@TTName"/>
    </td>
    <td align="left" width="250">

    <xsl:choose>
    <xsl:when test="translate(@TTName, ' ','_') =
    string('Locator_Code')">

    <asp:DropDownList runat="server" id="Locator_Code"
    title="{@TTDescription}">
    <asp:ListItem value="" title="{@TTDescription}" >-- Select
    --</asp:ListItem>
    <asp:ListItem value="Location1" />
    <asp:ListItem value="Location2" />
    </asp:DropDownList>
    </xsl:when>

    <xsl:when test="@TTName = string('Index Tabs')">
    <asp:RadioButtonList id="Index_Tabs" RepeatDirection="Horizontal"
    runat="server" title="{@TTDescription}">
    <asp:ListItem value="1" >Yes</asp:ListItem>
    <asp:ListItem value="2" >No</asp:ListItem>
    </asp:RadioButtonList>
    </xsl:when>

    <xsl:when test="@TTName = string('Collating')">
    <asp:RadioButtonList id="Collating" RepeatDirection="Horizontal"
    runat="server" title="{@TTDescription}">
    <asp:ListItem value="1" >Yes</asp:ListItem>
    <asp:ListItem value="2" >No</asp:ListItem>
    </asp:RadioButtonList>
    </xsl:when>

    <xsl:when test="@TTName = string('Cover Option')">
    <asp:RadioButtonList id="Cover_Option" RepeatDirection="Vertical"
    runat="server" title="{@TTDescription}">
    <asp:ListItem value="1" >Color</asp:ListItem>
    <asp:ListItem value="2" >Black &amp; White</asp:ListItem>
    </asp:RadioButtonList>
    </xsl:when>

    <xsl:when test="@TTName = string('Color Sides per Sheet')">
    <asp:RadioButtonList id="Color_Sides_per_Sheet"
    RepeatDirection="Horizontal" runat="server" title="{@TTDescription}">
    <asp:ListItem value="1" >One</asp:ListItem>
    <asp:ListItem value="2" >Two</asp:ListItem>
    </asp:RadioButtonList>
    </xsl:when>

    <xsl:when test="@TTName = string('Black and White Sides per
    Sheet')">
    <asp:RadioButtonList id="Black_and_White_Sides_per_Sheet"
    RepeatDirection="Horizontal" runat="server" title="{@TTDescription}">
    <asp:ListItem value="1" >One</asp:ListItem>
    <asp:ListItem value="2" >Two</asp:ListItem>
    </asp:RadioButtonList>
    </xsl:when>


    <xsl:when test="@TTName = string('Cover Stock')">
    <asp:DropDownList id="Cover_Stock" runat="server"
    title="{@TTDescription}">
    <asp:ListItem value="">-- Select --</asp:ListItem>
    <xsl:for-each select=".//Options">
    <asp:ListItem value="{@oID}"><xsl:value-of
    select="@oName"/></asp:ListItem>
    </xsl:for-each>
    </asp:DropDownList>
    </xsl:when>

    <xsl:when test="@TTName = string('Black and White Stock')">
    <asp:DropDownList id="Black_and_White_Stock" runat="server"
    title="{@TTDescription}">
    <asp:ListItem value="">-- Select --</asp:ListItem>
    <xsl:for-each select=".//Options">
    <asp:ListItem value="{@oID}" ><xsl:value-of
    select="@oName"/></asp:ListItem>
    </xsl:for-each>
    </asp:DropDownList>
    </xsl:when>

    <xsl:when test="@TTName = string('Color Stock')">
    <asp:DropDownList id="Color_Stock" runat="server"
    title="{@TTDescription}">
    <asp:ListItem value="">-- Select --</asp:ListItem>
    <xsl:for-each select=".//Options">
    <asp:ListItem value="{@oID}" ><xsl:value-of
    select="@oName"/></asp:ListItem>
    </xsl:for-each>
    </asp:DropDownList>

    </xsl:when>

    <xsl:when test="@TTName = string('Binding Method')">
    <asp:DropDownList id="Binding_Method" runat="server"
    title="{@TTDescription}">
    <asp:ListItem value="" >-- Select --</asp:ListItem>
    <xsl:for-each select=".//Options">
    <asp:ListItem value="{@oID}" ><xsl:value-of
    select="@oName"/></asp:ListItem>
    </xsl:for-each>
    </asp:DropDownList>

    </xsl:when>

    <xsl:when test="@TTName = string('Folding Method')">
    <asp:DropDownList id="Folding_Method" runat="server"
    title="{@TTDescription}">
    <asp:ListItem value="" >-- Select --</asp:ListItem>
    <xsl:for-each select=".//Options">
    <asp:ListItem value="{@oID}" ><xsl:value-of
    select="@oName"/></asp:ListItem>
    </xsl:for-each>
    </asp:DropDownList>
    </xsl:when>

    <xsl:when test="@TTName = string('Combs and Spiral Colors')">
    <asp:DropDownList id="Combs_and_Spiral_Colors" runat="server"
    title="{@TTDescription}">
    <asp:ListItem value="" >-- Select --</asp:ListItem>
    <xsl:for-each select=".//Options">
    <asp:ListItem value="{@oID}" ><xsl:value-of
    select="@oName"/></asp:ListItem>
    </xsl:for-each>
    </asp:DropDownList>
    <br/>

    </xsl:when>

    <xsl:when test="@TTName = string('Tape Binding')">
    <asp:DropDownList id="Tape_Binding" runat="server"
    title="{@TTDescription}">
    <asp:ListItem value="" >-- Select --</asp:ListItem>
    <xsl:for-each select=".//Options">
    <asp:ListItem value="{@oID}" ><xsl:value-of
    select="@oName"/></asp:ListItem>
    </xsl:for-each>
    </asp:DropDownList>
    </xsl:when>

    <xsl:when test="@TTName = string('Binder Colors')">
    <asp:DropDownList id="Binder_Colors" runat="server"
    title="{@TTDescription}">
    <asp:ListItem value="" >-- Select --</asp:ListItem>
    <xsl:for-each select=".//Options">
    <asp:ListItem value="{@oID}" ><xsl:value-of
    select="@oName"/></asp:ListItem>
    </xsl:for-each>
    </asp:DropDownList>
    </xsl:when>

    <xsl:when test="@TTName = string('Due Date')">
    <asp:placeHolder id="Due_Date" runat="server"
    title="{@TTDescription}"></asp:placeHolder>
    </xsl:when>
    <xsl:eek:therwise>
    <asp:TextBox id="{translate(@TTName,' ','_')}"
    title="{@TTDescription}" TextMode="SingleLine" runat="server"
    width="{(@TTSize * 12) mod 480}">
    <xsl:choose>
    <xsl:when test="@TTSize &lt; 51">
    <xsl:attribute name="TextMode">
    SingleLine
    </xsl:attribute>
    </xsl:when>
    <xsl:eek:therwise>
    <xsl:attribute name="TextMode">
    MultiLine
    </xsl:attribute>
    <xsl:attribute name="width">
    100%
    </xsl:attribute>
    </xsl:eek:therwise>
    </xsl:choose>
    </asp:TextBox>
    </xsl:eek:therwise>
    </xsl:choose>
    <xsl:if test="@TTRequiredField = 1"><asp:RequiredFieldValidator
    id="Validator_{translate(@TTName,' ','_')}" runat="server"
    ErrorMessage="&lt;br/&gt;{@TTDescription}"
    ControlToValidate="{translate(@TTName,'
    ','_')}"></asp:RequiredFieldValidator></xsl:if>
    </td>
    </tr>

    </xsl:for-each>

    </table>
    </td>

    </xsl:if>
    </tr>
    </xsl:for-each>
    </table>

    <asp:button id="Submitter" runat="server" Text="Submit" />

    </xsl:template>
    </xsl:stylesheet>
    ------------------------------------Code----------------------------------------------------------------------
    private void CreateForm()
    {
    // Load the data source


    SqlConnection sCon = new
    SqlConnection(ConfigurationSettings.AppSettings["ConnectionString"]);
    sCon.Open();


    System.Text.StringBuilder sb = new System.Text.StringBuilder();

    SqlDataReader dr =
    SqlHelper.ExecuteReader(ConfigurationSettings.AppSettings["ConnectionString"],
    CommandType.StoredProcedure, "XmlWorkOrderTemplate");


    while(dr.Read())
    {
    sb.Append(dr.GetString(0));
    }

    string xmlString = sb.ToString();



    XPathDocument surveyDoc = new
    XPathDocument(SqlHelper.ExecuteXmlReader(sCon,
    CommandType.StoredProcedure, "XmlWorkOrderTemplate"));

    Context.Items["surveyDoc"] = surveyDoc;

    // Load the xslt to do the transformations
    XslTransform transform = new XslTransform();
    transform.Load(Server.MapPath("~/schemas/XSLTTemplateMaker.xslt"));

    // Get the transformed result
    StringWriter sw = new StringWriter();
    transform.Transform(surveyDoc, null, sw);

    string result = sw.ToString();

    // remove the namespace attribute
    result = result.Replace("xmlns:asp=\"remove\"", "");
    result = result.Replace("xmlns:uc1=\"remove\"", "");


    // parse the control(s) and add it to the page
    Control ctrl = Page.ParseControl(result);
    Panel1.Controls.Add(ctrl);

    DueDatePicker ddp =
    (DueDatePicker)LoadControl("UC/DueDatePicker.ascx");
    PlaceHolder DueDatePH = (PlaceHolder)Panel1.FindControl("Due_Date");
    DueDatePH.Controls.Add(ddp);

    /*PeoplePicker pdo =
    (PeoplePicker)LoadControl("UC/PeoplePicker.ascx");
    PeoplePicker bdo =
    (PeoplePicker)LoadControl("UC/PeoplePicker.ascx");
    PeoplePicker pmt =
    (PeoplePicker)LoadControl("UC/PeoplePicker.ascx");
    PeoplePicker man =
    (PeoplePicker)LoadControl("UC/PeoplePicker.ascx");

    PlaceHolder managerPH =
    (PlaceHolder)Panel1.FindControl("Manager_6");
    managerPH.Controls.Add(man);

    PlaceHolder primaryDataOwner =
    (PlaceHolder)Panel1.FindControl("Primary_Data_Owner_2");
    primaryDataOwner.Controls.Add(pdo);

    PlaceHolder backupDataOwner =
    (PlaceHolder)Panel1.FindControl("Backup_Data_Owner_3");
    backupDataOwner.Controls.Add(bdo);

    PlaceHolder pmtHolder = (PlaceHolder)Panel1.FindControl("PMt_3");
    pmtHolder.Controls.Add(pmt); */
    }

    private void ProcessResults ()
    {
    ArrayList ItemsForApproval = new ArrayList();
    string ITId;
    string ITName;
    string TTId;
    string TTNo;
    string TTName;
    string NodeName;
    string pmtName= "";


    errors.Text = "";
    messages.Text = "";

    //string target =
    ((PeoplePicker)Page.FindControl("PeoplePicker1")).Value;
    string target = PeoplePicker1.Value;

    if (target != null)
    {
    //string human =
    ((PeoplePicker)Page.FindControl("PeoplePicker1")).Text;
    string human = PeoplePicker1.Text;
    string dateNow = System.DateTime.Now.ToString();

    SRFChainOfCommand requestChain = new SRFChainOfCommand(target);

    SRFPerson personManager = requestChain.Manager;
    SRFPerson personDirector = requestChain.Director;

    RRFWorkOrderSummary wos = new RRFWorkOrderSummary();

    bool abort = false;


    if (target != null)
    {
    System.Text.StringBuilder sb = new System.Text.StringBuilder();

    sb.Append("<?xml version=\"1.0\" encoding=\"utf-8\"?>");

    sb.Append(Environment.NewLine);

    sb.Append("<WorkOrder WORequestor=\"" + User.Identity.Name + "\"
    WOTarget=\"" + target + "\" WOHuman=\"" + human + "\" WODate=\"" +
    dateNow + "\" >");
    sb.Append(Environment.NewLine);

    // Load the data source
    XPathDocument surveyDoc =
    (XPathDocument)Context.Items["surveyDoc"];

    // create an iterator for each question
    XPathNodeIterator itra =
    surveyDoc.CreateNavigator().Select("//ItemType");

    // foreach question
    while (itra.MoveNext())
    {
    ITId = itra.Current.GetAttribute("ITId", "");
    ITName = itra.Current.GetAttribute("ITName", "");

    ItemsForApproval.Add(Convert.ToInt32(ITId.ToString()));

    //validate here and make sure we have all the data we're going
    to need for each
    //type of request
    switch (ITId)
    {
    case "1": // new employee request
    //make all sorts of wacky stuff happen

    break;

    case "2": // directory Access request

    break;

    case "11": // local administrator rights

    break;


    case "15": // email forward


    break;

    case "17": //shared project area


    break;
    }

    sb.Append("<WorkItem ITId=\"" + ITId + "\" WIStatus=\"0\"
    WIGrant=\"1\" WIStatusDate=\"" + System.DateTime.Now.ToString() +
    "\">");
    sb.Append(Environment.NewLine);

    sb.Append("<ItemType ITId=\"" + ITId + "\" ITName=\"" + ITName +
    "\">");
    sb.Append(Environment.NewLine);

    XPathNodeIterator itr =
    itra.Current.SelectChildren("TypeTemplate", "");

    while (itr.MoveNext())
    {

    // get the control name
    TTId = itr.Current.GetAttribute("TTId", "");
    TTNo = itr.Current.GetAttribute("TTNo", "");
    TTName = itr.Current.GetAttribute("TTName", "");


    NodeName = TTName;
    if (NodeName.Equals(""))
    {
    NodeName = ITName;
    sb.Append("<TypeTemplate>");
    sb.Append(Environment.NewLine);
    }
    else
    {
    sb.Append("<TypeTemplate TTId=\"" + TTId + "\" TTNo=\"" + TTNo
    + "\" ITId=\"" + ITId + "\" TTName=\"" + TTName + "\">");
    sb.Append(Environment.NewLine);
    }

    string controlName = NodeName.Replace(" ", "_"); // + "_" +
    itr.CurrentPosition.ToString();

    // append question information

    // get the control
    object ctrl = Panel1.FindControl(controlName);
    // append the correct filled out information
    if (ctrl is TextBox)
    {
    string theVal = ((TextBox)ctrl).Text;
    if (theVal.Length > 0)
    {
    sb.Append("<Note TTId=\"" + TTId + "\" NData=\"" +
    theVal.Replace("\"","'").Replace("&", "&amp;") + "\" />");
    switch (((TextBox)ctrl).ID)
    {

    case "Charge_Number":
    wos.wosCharge = theVal;
    Trace.Write("The charge was set to " + wos.wosCharge);
    break;

    case "Details":
    wos.wosDetails = theVal;

    break;

    case "Black_and_White_Originals":
    wos.wosBWOriginals = Convert.ToInt32(theVal);

    break;

    case "Black_and_White_Copies":
    wos.wosBWCopies = Convert.ToInt32(theVal);

    break;
    case "Color_Originals":
    wos.wosColorOriginals = Convert.ToInt32(theVal);

    break;

    case "Color_Copies":
    wos.wosColorCopies = Convert.ToInt32(theVal);

    break;

    case "Sets_of_Index_Tabs":
    wos.wosNumIndexTabs = Convert.ToInt32(theVal);

    break;
    }
    }
    }
    if (ctrl is RadioButtonList)
    {
    // the selected item might be null
    if (((RadioButtonList)ctrl).SelectedItem != null)
    {
    string theRadioVal =
    ((RadioButtonList)ctrl).SelectedItem.Value;

    sb.Append("<Note TTId=\"" + TTId + "\" NData=\"" +
    ((RadioButtonList)ctrl).SelectedItem.Text + "\" />");
    switch (((RadioButtonList)ctrl).ID)
    {
    case "Black_and_White_Sides_per_Sheet":
    wos.wosBWSides = Convert.ToInt32(theRadioVal);

    break;
    case "Color_Sides_per_Sheet":
    wos.wosColorSides = Convert.ToInt32(theRadioVal);

    break;
    case "Cover_Option":
    wos.wosCoverOption = Convert.ToInt32(theRadioVal);

    break;
    case "Index_Tabs":
    wos.wosIndexTabs = Convert.ToInt32(theRadioVal);

    break;

    case "Collating":
    wos.wosCollating = Convert.ToInt32(theRadioVal);

    break;
    }

    }
    }
    if (ctrl is Calendar)
    {
    sb.Append("<Note TTId=\"" + TTId + "\" NData=\"" +
    ((Calendar)ctrl).SelectedDate.ToString() + "\" />");

    // this means it's the due date, add it to the list.
    wos.wosDueDate = ((Calendar)ctrl).SelectedDate;
    }

    /*if (ctrl is PeoplePicker)
    {
    sb.Append("<Note TTId=\"" + TTId + "\" NData=\"" +
    ((PeoplePicker)ctrl).Value.ToString() + "\" />");
    }*/

    if (ctrl is PlaceHolder)
    {
    //we're taking it on faith that only DueDatePickers will be in
    placeholders,
    //but that's ok becuase if that isn't the case, we would have
    to specify that
    //manually, and we'd know about the change.

    DueDatePicker subControl =
    (DueDatePicker)(((PlaceHolder)ctrl).Controls[0]);
    if(!subControl.SelectedDate.Equals((new
    RRFDueDate()).TheDateTime))
    {
    sb.Append("<Note TTId=\"" + TTId + "\" NData=\"" +
    subControl.SelectedDate.ToString() + "\" />");
    }
    wos.wosDueDate = subControl.SelectedDate;

    }
    if (ctrl is DropDownList)
    {
    string theVal =
    ((DropDownList)ctrl).SelectedItem.Value.ToString();
    string theText =
    ((DropDownList)ctrl).SelectedItem.Text.ToString();
    if (theVal.Length > 0)
    {
    sb.Append("<Note TTId=\"" + TTId + "\" NData=\"" + theText +
    "\" />");
    switch (((DropDownList)ctrl).ID)
    {
    case "Locator_Code": // string
    wos.wosLocator = theVal;

    break;

    case "Cover_Stock": // integer
    wos.wosCoverStockID = Convert.ToInt32(theVal);

    break;

    case "Black_and_White_Stock": //integer
    wos.wosBWStockID = Convert.ToInt32(theVal);

    break;

    case "Color_Stock": // integer
    wos.wosColorStockID = Convert.ToInt32(theVal);

    break;

    case "Binding_Method": //integer
    wos.wosBindingMethod = Convert.ToInt32(theVal);

    break;

    case "Folding_Method": //integer
    wos.wosFoldingMethod = Convert.ToInt32(theVal);

    break;

    case "Combs_and_Spiral_Colors": //integer
    wos.wosCombsSpiralColors = Convert.ToInt32(theVal);

    break;

    case "Tape_Binding": // integer
    wos.wosTapeBinding = Convert.ToInt32(theVal);

    break;

    case "Binder_Colors": // integer
    wos.wosBinderColors = Convert.ToInt32(theVal);

    break;


    }

    }
    }
    sb.Append(Environment.NewLine);
    sb.Append("</TypeTemplate>");
    sb.Append(Environment.NewLine);
    }
    sb.Append("</ItemType>");
    sb.Append(Environment.NewLine);
    sb.Append("</WorkItem>");
    sb.Append(Environment.NewLine);
    }


    sb.Append("</WorkOrder>");
    sb.Append(Environment.NewLine);

    TextBox newBox = new TextBox();
    newBox.Text = sb.ToString();

    if(!abort)
    {
    //try
    //{

    SqlParameter [] param = new SqlParameter[2];

    param[0] = new SqlParameter("@Order_Xml", SqlDbType.Text);
    param[0].Direction = ParameterDirection.Input;
    param[0].Value = newBox.Text;

    param[1] = new SqlParameter("@OrderID", SqlDbType.Int);
    param[1].Direction = ParameterDirection.Output;

    SqlHelper.ExecuteNonQuery(ConfigurationSettings.AppSettings["ConnectionString"],
    CommandType.StoredProcedure, "XmlNewWorkOrder", param);

    int WorkOrderID = Convert.ToInt32(param[1].Value.ToString());

    wos.wosWOId = WorkOrderID;
    wos.Insert();

    //string emailAddresses = requestChain.User.Email + ";";
    , Jun 1, 2005
    #5
  6. Amelyan

    Guest

    oops I put the wrong XML template up, might be confusing!

    here's the right one:

    <ItemType ITId="1" ITName="Requestor Information" ITAppLevel="0">
    <TypeTemplate TTId="1" TTNo="1" ITId="1" TTName="Charge Number"
    TTSize="10" TTRequiredField="1" TTDescription="Please enter a charge
    number for this request.">
    <CostCategory>
    <Options/>
    </CostCategory>
    </TypeTemplate>
    <TypeTemplate TTId="2" TTNo="2" ITId="1" TTName="Locator Code"
    TTSize="10" TTRequiredField="1" TTDescription="Please select a locator
    code for this request.">
    <CostCategory>
    <Options/>
    </CostCategory>
    </TypeTemplate>
    </ItemType>
    <ItemType ITId="2" ITName="Project Description" ITAppLevel="0">
    <TypeTemplate TTId="3" TTNo="1" ITId="2" TTName="Details"
    TTSize="1000" TTRequiredField="1" TTDescription="Please specify a
    description for this request.">
    <CostCategory>
    <Options/>
    </CostCategory>
    </TypeTemplate>
    </ItemType>
    <ItemType ITId="3" ITName="Copy Information" ITAppLevel="0">
    <TypeTemplate TTId="22" TTNo="1" ITId="3" TTName="Due Date"
    TTSize="64" TTRequiredField="0" TTDescription="You must select a due
    date for this document.">
    <CostCategory>
    <Options/>
    </CostCategory>
    </TypeTemplate>
    <TypeTemplate TTId="4" TTNo="2" ITId="3" TTName="Black and White
    Originals" TTSize="5" TTRequiredField="0" TTDescription="Enter the
    number of black and white pages in the original document.">
    <CostCategory>
    <Options/>
    </CostCategory>
    </TypeTemplate>
    <TypeTemplate TTId="5" TTNo="3" ITId="3" TTName="Black and White
    Copies" TTSize="5" TTRequiredField="0" TTDescription="Enter the number
    of black and white copies of the entire document (not the number of
    pages.) ">
    <CostCategory>
    <Options/>
    </CostCategory>
    </TypeTemplate>
    <TypeTemplate TTId="6" TTNo="4" ITId="3" TTName="Black and White
    Sides per Sheet" TTSize="5" TTRequiredField="0" TTDescription="Enter
    the number of sides per sheet of black and white printing.">
    <CostCategory>
    <Options/>
    </CostCategory>
    </TypeTemplate>
    <TypeTemplate TTId="7" TTNo="5" ITId="3" TTName="Color Originals"
    TTSize="5" TTRequiredField="0" TTDescription="Enter the number of color
    pages in the original document.">
    <CostCategory>
    <Options/>
    </CostCategory>
    </TypeTemplate>
    <TypeTemplate TTId="24" TTNo="6" ITId="3" TTName="Color Copies"
    TTSize="5" TTRequiredField="0" TTDescription="Enter the number of color
    copies of the entire document (not the number of pages.) ">
    <CostCategory>
    <Options/>
    </CostCategory>
    </TypeTemplate>
    <TypeTemplate TTId="25" TTNo="7" ITId="3" TTName="Color Sides per
    Sheet" TTSize="5" TTRequiredField="0" TTDescription="Enter the number
    of sides per sheet of color printing.">
    <CostCategory>
    <Options/>
    </CostCategory>
    </TypeTemplate>
    <TypeTemplate TTId="26" TTNo="8" ITId="3" TTName="Cover Option"
    TTSize="5" TTRequiredField="0" TTDescription="Is you cover printed with
    color or black ink?">
    <CostCategory>
    <Options/>
    </CostCategory>
    </TypeTemplate>
    <TypeTemplate TTId="10" TTNo="9" ITId="3" TTName="Index Tabs"
    TTSize="5" TTRequiredField="0" TTDescription="Select Yes if you wish to
    include index tabs in this document.">
    <CostCategory>
    <Options/>
    </CostCategory>
    </TypeTemplate>
    <TypeTemplate TTId="12" TTNo="10" ITId="3" TTName="Sets of Index
    Tabs" TTSize="5" TTRequiredField="0" TTDescription="How many sets of
    index tabs per document copied?">
    <CostCategory>
    <Options/>
    </CostCategory>
    </TypeTemplate>
    <TypeTemplate TTId="13" TTNo="11" ITId="3" TTName="Collating"
    TTSize="5" TTRequiredField="0" TTDescription="Do you wish to have this
    document collated?">
    <CostCategory>
    <Options/>
    </CostCategory>
    </TypeTemplate>
    </ItemType>
    <ItemType ITId="4" ITName="Quantities, Color and Paper Options"
    ITAppLevel="0">
    <TypeTemplate TTId="14" TTNo="1" ITId="4" TTName="Cover Stock"
    TTSize="64" TTCostID="1" TTRequiredField="0" TTDescription="Select the
    type of cover stock you with to use.">
    <CostCategory ccID="1" ccName="Cover Stock" ccDesc="Select a cover
    stock ID from the list." ccCountAs="0">
    <Options oID="1" ccID="1" oName="65# - STOCK-BLUE"
    oUnPrice="0.0200" oDesc=""/>
    <Options oID="2" ccID="1" oName="65# - STOCK-CANARY"
    oUnPrice="1.0100" oDesc=""/>
    <Options oID="3" ccID="1" oName="65# - STOCK-GRAY GRANITE"
    oUnPrice="0.0000"/>
    <Options oID="4" ccID="1" oName="65# - STOCK-GREEN"
    oUnPrice="1.0000" oDesc=""/>
    <Options oID="5" ccID="1" oName="65# - STOCK-IVORY"
    oUnPrice="0.0000"/>
    <Options oID="6" ccID="1" oName="65# - STOCK-SALMON"
    oUnPrice="0.0000"/>
    <Options oID="7" ccID="1" oName="65# - STOCK-WHITE"
    oUnPrice="0.0000"/>
    <Options oID="20" ccID="1" oName="90# STOCK BLUE"
    oUnPrice="0.0000"/>
    <Options oID="17" ccID="1" oName="90# STOCK LIME"
    oUnPrice="0.0000"/>
    <Options oID="19" ccID="1" oName="90# STOCK PINK"
    oUnPrice="0.0000"/>
    <Options oID="18" ccID="1" oName="90# STOCK YELLOW"
    oUnPrice="0.0000"/>
    <Options oID="8" ccID="1" oName="CLEAR PLASTIC-STD ACETATE"
    oUnPrice="0.0000"/>
    <Options oID="9" ccID="1" oName="CTC - 11X17-BINDER"
    oUnPrice="0.0000"/>
    <Options oID="10" ccID="1" oName="CTC-BOOKLETS" oUnPrice="0.0000"/>
    <Options oID="12" ccID="1" oName="CTC-CAP. SUM."
    oUnPrice="0.0000"/>
    <Options oID="11" ccID="1" oName="CTC-LANDSCAPE"
    oUnPrice="0.0000"/>
    <Options oID="13" ccID="1" oName="CTC-WINDOW" oUnPrice="0.0000"/>
    <Options oID="14" ccID="1" oName="CUSTOM-CONFIDENTIAL"
    oUnPrice="0.0000"/>
    <Options oID="15" ccID="1" oName="CUSTOM-WINDOW"
    oUnPrice="0.0000"/>
    <Options oID="16" ccID="1" oName="CUSTOM2" oUnPrice="0.0000"/>
    </CostCategory>
    </TypeTemplate>
    <TypeTemplate TTId="15" TTNo="2" ITId="4" TTName="Black and White
    Stock" TTSize="64" TTCostID="2" TTRequiredField="0"
    TTDescription="Select the type of stock on which to print black and
    white pages.">
    <CostCategory ccID="2" ccName="Black and White Stock"
    ccDesc="Select Black and White Stock from the list below."
    ccCountAs="2">
    <Options oID="21" ccID="2" oName="20# - LEDGER-STOCK-WHITE"
    oUnPrice="0.0120" oDesc=""/>
    <Options oID="36" ccID="2" oName="20# - LEGAL BLUE"
    oUnPrice="0.0190" oDesc=""/>
    <Options oID="22" ccID="2" oName="20# - LEGAL- STOCK-WHITE"
    oUnPrice="0.0700" oDesc=""/>
    <Options oID="26" ccID="2" oName="20# - LETTER - GOLDEN ROD"
    oUnPrice="0.0260" oDesc=""/>
    <Options oID="27" ccID="2" oName="20# - LETTER - GRAY"
    oUnPrice="0.0260" oDesc=""/>
    <Options oID="28" ccID="2" oName="20# - LETTER - GRAY GRANITE"
    oUnPrice="0.0270" oDesc=""/>
    <Options oID="29" ccID="2" oName="20# - LETTER - GREEN"
    oUnPrice="0.0030" oDesc=""/>
    <Options oID="30" ccID="2" oName="20# - LETTER - HOT PINK"
    oUnPrice="0.0260" oDesc=""/>
    <Options oID="31" ccID="2" oName="20# - LETTER - IVORY"
    oUnPrice="0.0260" oDesc=""/>
    <Options oID="32" ccID="2" oName="20# - LETTER - ORCHID"
    oUnPrice="0.0260" oDesc=""/>
    <Options oID="33" ccID="2" oName="20# - LETTER - PINK"
    oUnPrice="0.0260" oDesc=""/>
    <Options oID="34" ccID="2" oName="20# - LETTER - SALMON"
    oUnPrice="0.0270" oDesc=""/>
    <Options oID="35" ccID="2" oName="20# - LETTER - WHITE"
    oUnPrice="0.0050" oDesc=""/>
    <Options oID="23" ccID="2" oName="20# - LETTER-AQUA"
    oUnPrice="0.0260" oDesc=""/>
    <Options oID="24" ccID="2" oName="20# - LETTER-BLUE"
    oUnPrice="0.0030" oDesc=""/>
    <Options oID="25" ccID="2" oName="20# - LETTER-CANARY"
    oUnPrice="0.0030" oDesc=""/>
    <Options oID="40" ccID="2" oName="24# LETTER BRIGHT GREEN"
    oUnPrice="0.0010" oDesc=""/>
    <Options oID="38" ccID="2" oName="24# LETTER LIME"
    oUnPrice="0.0100" oDesc=""/>
    <Options oID="41" ccID="2" oName="24# LETTER ORANGE"
    oUnPrice="0.0110" oDesc=""/>
    <Options oID="39" ccID="2" oName="24# LETTER RED" oUnPrice="0.0110"
    oDesc=""/>
    <Options oID="117" ccID="2" oName="TRANSPARENCIES"
    oUnPrice="0.1865" oDesc=""/>
    <Options oID="37" ccID="2" oName="TRANSPARENCIES" oUnPrice="0.1870"
    oDesc=""/>
    </CostCategory>
    </TypeTemplate>
    <TypeTemplate TTId="16" TTNo="3" ITId="4" TTName="Color Stock"
    TTSize="64" TTCostID="3" TTRequiredField="0" TTDescription="Select the
    type of stock on which you wish to print color pages.">
    <CostCategory ccID="3" ccName="Color Stock" ccDesc="Select Color
    Stock from the list below." ccCountAs="1">
    <Options oID="58" ccID="3" oName="100# LEDGER" oUnPrice="0.0510"
    oDesc=""/>
    <Options oID="57" ccID="3" oName="100# LETTER" oUnPrice="0.0510"
    oDesc=""/>
    <Options oID="43" ccID="3" oName="24# LEDGER" oUnPrice="0.0120"
    oDesc=""/>
    <Options oID="44" ccID="3" oName="24# LEGAL" oUnPrice="0.0120"
    oDesc=""/>
    <Options oID="42" ccID="3" oName="24# LETTER" oUnPrice="0.0120"
    oDesc=""/>
    <Options oID="46" ccID="3" oName="28# LEDGER" oUnPrice="0.0290"
    oDesc=""/>
    <Options oID="45" ccID="3" oName="28# LETTER" oUnPrice="0.0210"
    oDesc=""/>
    <Options oID="49" ccID="3" oName="32# 18X12" oUnPrice="0.0390"
    oDesc=""/>
    <Options oID="48" ccID="3" oName="32# LEDGER" oUnPrice="0.0360"
    oDesc=""/>
    <Options oID="47" ccID="3" oName="32# LETTER" oUnPrice="0.0310"
    oDesc=""/>
    <Options oID="51" ccID="3" oName="60# LEDGER" oUnPrice="0.0630"
    oDesc=""/>
    <Options oID="50" ccID="3" oName="60# LETTER" oUnPrice="0.0630"
    oDesc=""/>
    <Options oID="53" ccID="3" oName="65# LEDGER" oUnPrice="0.0750"
    oDesc=""/>
    <Options oID="52" ccID="3" oName="65# LETTER" oUnPrice="0.0710"
    oDesc=""/>
    <Options oID="56" ccID="3" oName="80# GLOSS letter or ledger"
    oUnPrice="0.0990" oDesc=""/>
    <Options oID="54" ccID="3" oName="80# LEDGER" oUnPrice="0.0830"
    oDesc=""/>
    <Options oID="55" ccID="3" oName="80# LETTER" oUnPrice="0.0410"
    oDesc=""/>
    <Options oID="97" ccID="3" oName="CD Label 2-up" oUnPrice="0.3510"
    oDesc=""/>
    <Options oID="118" ccID="3" oName="Label 1-up" oUnPrice="0.4812"
    oDesc=""/>
    <Options oID="59" ccID="3" oName="Label 2-up" oUnPrice="0.5000"
    oDesc=""/>
    <Options oID="60" ccID="3" oName="TRANSPARENCIES"
    oUnPrice="0.0000"/>
    </CostCategory>
    </TypeTemplate>
    </ItemType>
    <ItemType ITId="5" ITName="Binding and Finishing Options"
    ITAppLevel="0">
    <TypeTemplate TTId="17" TTNo="1" ITId="5" TTName="Binding Method"
    TTSize="64" TTCostID="4" TTRequiredField="0" TTDescription="Select the
    binding method you wish to use for this document.">
    <CostCategory ccID="4" ccName="Binding Method" ccDesc="Select
    binding method below.">
    <Options oID="61" ccID="4" oName="BINDER, 3-RING"
    oUnPrice="0.0000"/>
    <Options oID="62" ccID="4" oName="BOOKLET" oUnPrice="0.0000"/>
    <Options oID="63" ccID="4" oName="CLIP" oUnPrice="0.0000"/>
    <Options oID="66" ccID="4" oName="GBC COMB" oUnPrice="0.0000"/>
    <Options oID="68" ccID="4" oName="LAMINATING" oUnPrice="0.0000"/>
    <Options oID="64" ccID="4" oName="PAD" oUnPrice="0.0000"/>
    <Options oID="67" ccID="4" oName="PUNCH" oUnPrice="0.0000"/>
    <Options oID="65" ccID="4" oName="SPIRAL" oUnPrice="0.0000"/>
    <Options oID="69" ccID="4" oName="STAPLE" oUnPrice="0.0000"/>
    <Options oID="70" ccID="4" oName="TAPE" oUnPrice="0.0000"/>
    <Options oID="71" ccID="4" oName="THERMAL" oUnPrice="0.0000"/>
    </CostCategory>
    </TypeTemplate>
    <TypeTemplate TTId="18" TTNo="2" ITId="5" TTName="Folding Method"
    TTSize="64" TTCostID="5" TTRequiredField="0" TTDescription="Select the
    folding method you wish to use for this document (if any)">
    <CostCategory ccID="5" ccName="Folding Method" ccDesc="Select
    folding method below.">
    <Options oID="73" ccID="5" oName="DOUBLE LETTER FOLD"
    oUnPrice="0.0000"/>
    <Options oID="72" ccID="5" oName="DOUBLE PARALLEL FOLD"
    oUnPrice="0.0000"/>
    <Options oID="74" ccID="5" oName="ENGINEERING FOLD"
    oUnPrice="0.0000"/>
    <Options oID="75" ccID="5" oName="FAN FOLD" oUnPrice="0.0000"/>
    <Options oID="76" ccID="5" oName="FRENCH FOLD" oUnPrice="0.0000"/>
    <Options oID="77" ccID="5" oName="LETTER FOLD" oUnPrice="0.0000"/>
    <Options oID="78" ccID="5" oName="SINGLE FOLD" oUnPrice="0.0000"/>
    </CostCategory>
    </TypeTemplate>
    <TypeTemplate TTId="19" TTNo="3" ITId="5" TTName="Combs and Spiral
    Colors" TTSize="64" TTCostID="6" TTRequiredField="0"
    TTDescription="Select the type of spiral or combs you wish to use for
    this document.">
    <CostCategory ccID="6" ccName="Combs and Spiral Colors"
    ccDesc="Select color of combs and spirals below.">
    <Options oID="79" ccID="6" oName="BLACK" oUnPrice="0.0000"/>
    <Options oID="116" ccID="6" oName="BLACK 1/2&quot;"
    oUnPrice="0.0500" oDesc=""/>
    <Options oID="80" ccID="6" oName="BLUE" oUnPrice="0.0000"/>
    <Options oID="81" ccID="6" oName="GRAY" oUnPrice="0.0000"/>
    <Options oID="85" ccID="6" oName="HUNTER GREEN" oUnPrice="0.0000"/>
    <Options oID="83" ccID="6" oName="MAROON" oUnPrice="0.0000"/>
    <Options oID="84" ccID="6" oName="NAVY" oUnPrice="0.0000"/>
    <Options oID="82" ccID="6" oName="WHITE" oUnPrice="0.0000"/>
    </CostCategory>
    </TypeTemplate>
    <TypeTemplate TTId="20" TTNo="4" ITId="5" TTName="Tape Binding"
    TTSize="64" TTCostID="7" TTRequiredField="0" TTDescription="Select the
    type of binding tape you wish to use on this document.">
    <CostCategory ccID="7" ccName="Tape Binding" ccDesc="Select type of
    binding tape below.">
    <Options oID="86" ccID="7" oName="BLACK BINDING TAPE"
    oUnPrice="0.0000"/>
    <Options oID="90" ccID="7" oName="BROWN BINDING TAPE"
    oUnPrice="0.0000"/>
    <Options oID="89" ccID="7" oName="GREEN BINDING TAPE"
    oUnPrice="0.0000"/>
    <Options oID="87" ccID="7" oName="GREY BINDING TAPE"
    oUnPrice="0.0000"/>
    <Options oID="91" ccID="7" oName="NAVY BINDING TAPE"
    oUnPrice="0.0000"/>
    <Options oID="88" ccID="7" oName="RED BINDING TAPE"
    oUnPrice="0.0000"/>
    <Options oID="92" ccID="7" oName="WHITE BINDING TAPE"
    oUnPrice="0.0000"/>
    </CostCategory>
    </TypeTemplate>
    <TypeTemplate TTId="21" TTNo="5" ITId="5" TTName="Binder Colors"
    TTSize="64" TTCostID="8" TTRequiredField="0" TTDescription="Select the
    type of binder you wish to use in this document.">
    <CostCategory ccID="8" ccName="Binder Colors" ccDesc="Select color
    of binders below.">
    <Options oID="100" ccID="8" oName="BLACK 1 1/2&quot;"
    oUnPrice="2.6500" oDesc=""/>
    <Options oID="98" ccID="8" oName="BLACK 1&quot;" oUnPrice="1.9500"
    oDesc=""/>
    <Options oID="94" ccID="8" oName="BLACK 1/2" oUnPrice="2.2000"
    oDesc=""/>
    <Options oID="99" ccID="8" oName="BLACK 2&quot;" oUnPrice="3.3500"
    oDesc=""/>
    <Options oID="101" ccID="8" oName="BLACK 2-1/2&quot;"
    oUnPrice="3.9800" oDesc=""/>
    <Options oID="102" ccID="8" oName="BLACK 2-1/2&quot;"
    oUnPrice="3.9800" oDesc=""/>
    <Options oID="103" ccID="8" oName="BLACK 3&quot;" oUnPrice="4.1000"
    oDesc=""/>
    <Options oID="110" ccID="8" oName="WHITE 1&quot; D-ring"
    oUnPrice="2.8000" oDesc=""/>
    <Options oID="105" ccID="8" oName="WHITE 1&quot; Round Ring"
    oUnPrice="1.9500" oDesc=""/>
    <Options oID="93" ccID="8" oName="WHITE 1&quot; Round Ring"
    oUnPrice="1.9500" oDesc=""/>
    <Options oID="111" ccID="8" oName="WHITE 1-1/2&quot; D-ring"
    oUnPrice="2.9900" oDesc=""/>
    <Options oID="106" ccID="8" oName="WHITE 1-1/2&quot; Round Ring"
    oUnPrice="2.6500" oDesc=""/>
    <Options oID="104" ccID="8" oName="WHITE 1/2&quot; Round Ring"
    oUnPrice="2.2000" oDesc=""/>
    <Options oID="112" ccID="8" oName="WHITE 2&quot; D
    -ring" oUnPrice="3.8600" oDesc=""/>
    <Options oID="107" ccID="8" oName="WHITE 2&quot; Round Ring"
    oUnPrice="3.3500" oDesc=""/>
    <Options oID="113" ccID="8" oName="WHITE 2-1/2&quot; D-ring"
    oUnPrice="4.1100" oDesc=""/>
    <Options oID="108" ccID="8" oName="WHITE 2-1/2&quot; Round Ring"
    oUnPrice="3.9800" oDesc=""/>
    <Options oID="114" ccID="8" oName="WHITE 3&quot; D-ring"
    oUnPrice="4.1500" oDesc=""/>
    <Options oID="109" ccID="8" oName="WHITE 3&quot; Round Ring"
    oUnPrice="4.0600" oDesc=""/>
    <Options oID="115" ccID="8" oName="WHITE 4&quot; D-ring"
    oUnPrice="8.9900" oDesc=""/>
    </CostCategory>
    </TypeTemplate>
    </ItemType>
    , Jun 1, 2005
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?RWFybCBUZWlncm9i?=

    Maintaining View State For Dynamically Created Controls

    =?Utf-8?B?RWFybCBUZWlncm9i?=, Oct 7, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    2,920
    =?Utf-8?B?RWFybCBUZWlncm9i?=
    Oct 7, 2004
  2. Julia
    Replies:
    0
    Views:
    378
    Julia
    Jul 10, 2005
  3. Replies:
    3
    Views:
    671
    jim4u
    Apr 10, 2006
  4. msimmons
    Replies:
    0
    Views:
    454
    msimmons
    Jul 16, 2009
  5. Earl Teigrob

    Maintaining View State For Dynamically Created Controls

    Earl Teigrob, Oct 7, 2004, in forum: ASP .Net Building Controls
    Replies:
    0
    Views:
    146
    Earl Teigrob
    Oct 7, 2004
Loading...

Share This Page