在文字文本中呈现服务器控件 [英] Rendering Server Controls in literal text
问题描述
大家好:
我正在尝试使用文字内容动态填充网页和
控件(文本框和复选框(最后是两个按钮 - 按钮
还没有出现在代码中。)我读取了一个xml文件,并使用从中检索的值
,确定应显示哪些文本以及哪些控件
应该呈现 - 最重要的是 - 那些控件应该是
渲染。
最终目标是拥有一些文本后跟一个控件,它将获取用户响应并将其发回服务器。例如
页面可能会显示:
请输入美元金额:[文本框转到此处]。
这是意外吗?[是的复选框]是[复选框否]否
问题是所有控件都在页面顶部呈现
以及关闭html标记后的所有文本呈现。我不是我知道为什么
这是我对Render方法的了解不够充分,可以聪明地说出它。我希望我已经清楚地解释了我想要做什么。如果没有,请告诉我。
代码在这里:
结构DynamicControl
Dim Type As String
Dim FieldType As String
Dim Name As String
Dim FieldName As String
Dim Size As String
Dim MaxLength As String
Dim EntryType As String
结束结构
私人文档作为XmlDocument
私有行作为XmlNodeList
私有ReqData作为XmlNodeList
私有子Page_Load(ByVal发送者作为System.Object,ByVal e As
System.EventArgs)处理MyBase.Load
Response.BufferOutput = True
Dim Line As XmlNode
Dim ChildNode为XmlNode
Dim DynamicEntry为XmlNode
输出=新HtmlTextWriter(txtWtr)
doc =新的XmlDocument
doc.Load(" C:\ SampleForm.xml")
Lines = doc.GetElementsByTagName(" Line")
ReqData = doc.GetElementsByTagName(" Data")
For Lines for Lines
如果Line.HasChildNodes那么
对于每个ChildNode In Line.ChildNodes
Dim attrList As XmlAttributeCollection =
ChildNode.Attributes
如果不是(attrList为Nothing)那么
尺寸DynCtl作为DynamicControl =
ParseDynamicCtrlData(attrList.GetNamedItem(QUOT; ID")V ALUE)
选择案例DynCtl.FieldType .ToLower
Case"复选框"
Dim c As CheckBox = New CheckBox
c.ID = attrList.GetNamedItem(" id" ).Value
c.Text = DynCtl.Name
Me.Controls(1).Controls.Add(c)
案例文本
Dim t As TextBox = New TextBox
t.ID = attrList.GetNamedItem(" id")。值
t.MaxLength = CType(DynCtl.MaxLength,Integer)
t.Text = DynCtl.Name
Me.Controls(1).Controls.Add(t)
E. nd选择
Else
Dim lit As Literal = New Literal
lit.Text = Line.InnerText& "< br />"
Me.Controls.Add(点亮)
结束如果
下一页
Else
Dim lit As Literal = New Literal
lit.Text = Line.InnerText& "< br />"
Me.Controls.Add(点亮)
结束如果
下一页
End Sub
私有函数ParseDynamicCtrlData(ByVal id As String)As
DynamicControl
Dim DataNode As XmlNode
Dim dc As DynamicControl
ReqData中的每个DataNode
如果是String.Compare(DataNode.Attributes(" name"))。 Value,id)= 0然后
dc.FieldType = DataNode.Attributes(" fieldtype")。Value
如果dc.FieldType.ToLower =" text"那么
如果是String.Compare(DataNode.Attributes(" type")。Value,
" merge")<> 0然后
dc.FieldName = DataNode.Attributes(" fieldname")。Value
dc.Name = DataNode.Attributes(" name")。Value
dc.Size = DataNode.Attributes(" size")。值
dc.MaxLength = DataNode.Attributes(" maxlength")。值
结束如果
ElseIf dc.FieldType.ToLower =" checkbox"然后
dc.FieldName = DataNode.Attributes(" fieldname")。Value
dc.Name = DataNode.Attributes(" name")。Value
结束如果
退出
结束如果
下一页
返回dc
结束功能
XML在这里:
< Form>
< Content>
< Line>< Dynamic type =" text" id =" DateField" />< / Line>
< Line />
< Line>< Dynamic type =" text" id =" CustomAddress1" />< / Line>
< Line>< Dynamic type =" text" id =" CustomAddress2" />< / Line>
< Line>< Dynamic type =" text" id =" CustomAddress3" />< / Line>
< Line>< Dynamic type =" text" id =" CustomAddress4" />< / Line>
< Line />
< Line />
< Line> RE:您的文件#:< Dynamic type =" text" id =" YourFile" />< / Line>
< Line>您的被保险人:< Dynamic type =" text" id =" YourInsured" />< / Line>
< Line>我们的文件#:<动态类型=" text" id =" OurFile" />< / Line>
< Line>我们的被保险人:< Dynamic type =" text" id =" OurInsured" />< / Line>
< Line>损失日期:< Dynamic type =" text" id =" DateOfLoss" />< / Line>
< Line />
< Line>我们要求您完成以下内容关于
您在上述被保险人的无过错文件。< / Line>
< Line />
< Line> Medical paid:< Dynamic type =" text" id =" MedicalPaid" />< / Line>
< Line>支付的工资损失:< Dynamic type =" text" id =" WageLossPaid" />< / Line>
< Line>支付的基本服务:<动态类型="文字"
id =" ; EssentialServicesPaid" />< / Line>
< Line>建议是否通过阈值:< Dynamic
type ="复选框" ID = QUOT; AdviseThresholdYes" />是<动态类型="复选框"
id =" AdviseThresholdNo" />否< / Line>
< Line>您此时是否进行过IME? < Dynamic
type ="复选框" ID = QUOT; ConductedIMEYes" />是<动态
type ="复选框" ID = QUOT; ConductedIMENo" />否< / Line>
< Line>如果没有,你是否考虑安排一个? < Dynamic
type ="复选框" ID = QUOT; ContemplateSchedulingYes" />是<动态
type ="复选框" ID = QUOT; ContemplateSchedulingNo" />否< / Line>
< Line>受伤的性质<动态类型=" text" id =" NatureOfInjury" />< / Line>
< Line>感谢您的合作,并附上回邮信封
以方便您使用。 < / Line>
< Line />
< Line>此致< / Line>
< Line / >
<行/>
<行/>
<行/>
< Line>< Dynamic type =" text" id =" AdjusterName" />< / Line>
< Line>< Dynamic type =" text" id =" AdjusterPhone" />< / Line>
< Line />
< Line>声明部门< / Line>
< Line />
< Line />
< Line> WB-204(12-99)< / Line>
< / Content>
< RequiredData>
< Data fieldtype =" NowDate" name =" DateField" />
< Data type =" Entry"字段类型= QUOT;文本" name =" CustomAddress1"
fieldname =" CustomAddress1"大小= QUOT; 30英寸; maxlength =" 30" />
<数据类型="条目"字段类型= QUOT;文本" name =" CustomAddress2"
fieldname =" CustomAddress2"大小= QUOT; 30英寸; maxlength =" 30" />
<数据类型="条目"字段类型= QUOT;文本" name =" CustomAddress3"
fieldname =" CustomAddress3"大小= QUOT; 30英寸; maxlength =" 30" />
<数据类型="条目"字段类型= QUOT;文本" name =" CustomAddress4"
fieldname =" CustomAddress4"大小= QUOT; 30英寸; maxlength =" 30" />
<数据类型="条目"字段类型= QUOT;文本"名称= QUOT; YourFile" fieldname =" YourFile"
size =" 30" maxlength =" 30" />
<数据类型="条目"字段类型= QUOT;文本" name =" YourInsured"
fieldname =" YourInsured"大小= QUOT; 30英寸; maxlength =" 30" />
<数据类型="条目"字段类型= QUOT;文本"名称= QUOT; OurFile" fieldname =" OurFile"
size =" 30" maxlength =" 30" />
<数据类型="条目"字段类型= QUOT;文本" name =" OurInsured"
fieldname =" OurInsured"大小= QUOT; 30英寸; maxlength =" 30" />
<数据类型="条目"字段类型= QUOT;文本" name =" DateOfLoss"
fieldname =" DateOfLoss"大小= QUOT; 30英寸; maxlength =" 30" />
<数据类型="条目"字段类型= QUOT;文本" name =" MedicalPaid"
fieldname =" MedicalPaid"大小= QUOT; 30英寸; MAXLENGTH = QUOT; 20" entrytype =" Numeric" />
< Data type =" Entry"字段类型= QUOT;文本" name =" WageLossPaid"
fieldname =" WageLossPaid"大小= QUOT; 30英寸; MAXLENGTH = QUOT; 20" entrytype =" Numeric" />
< Data type =" Entry"字段类型= QUOT;文本" name =" EssentialServicesPaid"
fieldname =" EssentialServicesPaid"大小= QUOT; 30英寸; maxlength =" 20"
entrytype =" Numeric" />
< Data type =" Entry"字段类型= QUOT;复选框" name =" AdviseThresholdYes"
fieldname =" AdviseThresholdYes" />
< Data type =" Entry"字段类型= QUOT;复选框" name =" AdviseThresholdNo"
fieldname =" AdviseThresholdNo" />
< Data type =" Entry"字段类型= QUOT;复选框" name =" ConductedIMEYes"
fieldname =" ConductedIMEYes" />
< Data type =" Entry"字段类型= QUOT;复选框" name =" ConductedIMENo"
fieldname =" ConductedIMENo" />
< Data type =" Entry"字段类型= QUOT;复选框" name =" ContemplateSchedulingYes"
fieldname =" ContemplateSchedulingYes" />
< Data type =" Entry"字段类型= QUOT;复选框" name =" ContemplateSchedulingNo"
fieldname =" ContemplateSchedulingNo" />
< Data type =" Entry"字段类型= QUOT;文本" name =" NatureOfInjury"
fieldname =" NatureOfInjury"大小= QUOT; 30英寸; maxlength =" 30" />
< Data type =" Merge"字段类型= QUOT;文本" name =" AdjusterName"
fieldname =" AdjusterName"大小= QUOT; 30英寸; maxlength =" 30" />
< Data type =" Merge"字段类型= QUOT;文本" name =" AdjusterPhone"
fieldname =" AdjusterPhone"大小= QUOT; 30英寸; maxlength =" 30">
< / RequiredData>
< / Form>
任何帮助都会非常感谢。
-
Joe
VB.NET/C#/ASP.NET/ASP/VB/C++ / Web和数据库开发/ VBA自动化
Hello All:
I am trying to dynamically populate a web page with literal content and
controls (textboxes and checkboxes (and eventually two buttons - the buttons
do not appear in the code yet). I read an xml file and, using the values
retrieved from it, determine what text should be displayed and which controls
should be rendered and - most importantly - where those controls should be
rendered.
The ultimate goal is to have some text followed by a control that will
capture the users response and post it back to the server. For example the
page might show:
Please enter the dollar amount: [textbox goes here].
Was this an accident? [checkbox for yes] Yes [checkbox for no] No
The problem is that all of the controls are rendered at the top of the page
and all of the text renders after the closing html tag. I don''t know why
this is and I don''t know enough about the Render method to speak
intelligently about it. I hope that I have explained clearly what I am
trying to do. If not please let me know.
The code is here:
Structure DynamicControl
Dim Type As String
Dim FieldType As String
Dim Name As String
Dim FieldName As String
Dim Size As String
Dim MaxLength As String
Dim EntryType As String
End Structure
Private doc As XmlDocument
Private Lines As XmlNodeList
Private ReqData As XmlNodeList
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Response.BufferOutput = True
Dim Line As XmlNode
Dim ChildNode As XmlNode
Dim DynamicEntry As XmlNode
output = New HtmlTextWriter(txtWtr)
doc = New XmlDocument
doc.Load("C:\SampleForm.xml")
Lines = doc.GetElementsByTagName("Line")
ReqData = doc.GetElementsByTagName("Data")
For Each Line In Lines
If Line.HasChildNodes Then
For Each ChildNode In Line.ChildNodes
Dim attrList As XmlAttributeCollection =
ChildNode.Attributes
If Not (attrList Is Nothing) Then
Dim DynCtl As DynamicControl =
ParseDynamicCtrlData(attrList.GetNamedItem("id").V alue)
Select Case DynCtl.FieldType.ToLower
Case "checkbox"
Dim c As CheckBox = New CheckBox
c.ID = attrList.GetNamedItem("id").Value
c.Text = DynCtl.Name
Me.Controls(1).Controls.Add(c)
Case "text"
Dim t As TextBox = New TextBox
t.ID = attrList.GetNamedItem("id").Value
t.MaxLength = CType(DynCtl.MaxLength, Integer)
t.Text = DynCtl.Name
Me.Controls(1).Controls.Add(t)
End Select
Else
Dim lit As Literal = New Literal
lit.Text = Line.InnerText & "<br/>"
Me.Controls.Add(lit)
End If
Next
Else
Dim lit As Literal = New Literal
lit.Text = Line.InnerText & "<br/>"
Me.Controls.Add(lit)
End If
Next
End Sub
Private Function ParseDynamicCtrlData(ByVal id As String) As
DynamicControl
Dim DataNode As XmlNode
Dim dc As DynamicControl
For Each DataNode In ReqData
If String.Compare(DataNode.Attributes("name").Value, id) = 0 Then
dc.FieldType = DataNode.Attributes("fieldtype").Value
If dc.FieldType.ToLower = "text" Then
If String.Compare(DataNode.Attributes("type").Value,
"merge") <> 0 Then
dc.FieldName = DataNode.Attributes("fieldname").Value
dc.Name = DataNode.Attributes("name").Value
dc.Size = DataNode.Attributes("size").Value
dc.MaxLength = DataNode.Attributes("maxlength").Value
End If
ElseIf dc.FieldType.ToLower = "checkbox" Then
dc.FieldName = DataNode.Attributes("fieldname").Value
dc.Name = DataNode.Attributes("name").Value
End If
Exit For
End If
Next
Return dc
End Function
The XML is here:
<Form>
<Content>
<Line><Dynamic type="text" id="DateField"/></Line>
<Line/>
<Line><Dynamic type="text" id="CustomAddress1"/></Line>
<Line><Dynamic type="text" id="CustomAddress2"/></Line>
<Line><Dynamic type="text" id="CustomAddress3"/></Line>
<Line><Dynamic type="text" id="CustomAddress4"/></Line>
<Line/>
<Line/>
<Line>RE: Your File #: <Dynamic type="text" id="YourFile"/></Line>
<Line> Your Insured: <Dynamic type="text" id="YourInsured"/></Line>
<Line> Our File #: <Dynamic type="text" id="OurFile"/></Line>
<Line> Our Insured: <Dynamic type="text" id="OurInsured"/></Line>
<Line> Date of Loss: <Dynamic type="text" id="DateOfLoss"/></Line>
<Line/>
<Line>We are asking you to please complete the following with regard to
your No-Fault file on the above mentioned insured.</Line>
<Line/>
<Line>Medical paid: <Dynamic type="text" id="MedicalPaid"/></Line>
<Line>Wage Loss paid: <Dynamic type="text" id="WageLossPaid"/></Line>
<Line>Essential Services paid: <Dynamic type="text"
id="EssentialServicesPaid"/></Line>
<Line>Advise if threshold passed: <Dynamic
type="checkbox" id="AdviseThresholdYes"/> Yes <Dynamic type="checkbox"
id="AdviseThresholdNo"/> No</Line>
<Line>Have you conducted an IME at this time? <Dynamic
type="checkbox" id="ConductedIMEYes"/> Yes <Dynamic
type="checkbox" id="ConductedIMENo"/> No</Line>
<Line>If not, do you contemplate scheduling one? <Dynamic
type="checkbox" id="ContemplateSchedulingYes"/> Yes <Dynamic
type="checkbox" id="ContemplateSchedulingNo"/> No</Line>
<Line>Nature of injury <Dynamic type="text" id="NatureOfInjury"/></Line>
<Line>We thank you for your cooperation and are enclosing a return envelope
for your convenience.</Line>
<Line/>
<Line>Sincerely,</Line>
<Line/>
<Line/>
<Line/>
<Line/>
<Line><Dynamic type="text" id="AdjusterName"/></Line>
<Line><Dynamic type="text" id="AdjusterPhone"/></Line>
<Line/>
<Line>Claims Department</Line>
<Line/>
<Line/>
<Line>WB-204 (12-99)</Line>
</Content>
<RequiredData>
<Data fieldtype="NowDate" name="DateField"/>
<Data type="Entry" fieldtype="Text" name="CustomAddress1"
fieldname="CustomAddress1" size="30" maxlength="30"/>
<Data type="Entry" fieldtype="Text" name="CustomAddress2"
fieldname="CustomAddress2" size="30" maxlength="30"/>
<Data type="Entry" fieldtype="Text" name="CustomAddress3"
fieldname="CustomAddress3" size="30" maxlength="30"/>
<Data type="Entry" fieldtype="Text" name="CustomAddress4"
fieldname="CustomAddress4" size="30" maxlength="30"/>
<Data type="Entry" fieldtype="Text" name="YourFile" fieldname="YourFile"
size="30" maxlength="30"/>
<Data type="Entry" fieldtype="Text" name="YourInsured"
fieldname="YourInsured" size="30" maxlength="30"/>
<Data type="Entry" fieldtype="Text" name="OurFile" fieldname="OurFile"
size="30" maxlength="30"/>
<Data type="Entry" fieldtype="Text" name="OurInsured"
fieldname="OurInsured" size="30" maxlength="30"/>
<Data type="Entry" fieldtype="Text" name="DateOfLoss"
fieldname="DateOfLoss" size="30" maxlength="30"/>
<Data type="Entry" fieldtype="Text" name="MedicalPaid"
fieldname="MedicalPaid" size="30" maxlength="20" entrytype="Numeric"/>
<Data type="Entry" fieldtype="Text" name="WageLossPaid"
fieldname="WageLossPaid" size="30" maxlength="20" entrytype="Numeric"/>
<Data type="Entry" fieldtype="Text" name="EssentialServicesPaid"
fieldname="EssentialServicesPaid" size="30" maxlength="20"
entrytype="Numeric"/>
<Data type="Entry" fieldtype="Checkbox" name="AdviseThresholdYes"
fieldname="AdviseThresholdYes"/>
<Data type="Entry" fieldtype="Checkbox" name="AdviseThresholdNo"
fieldname="AdviseThresholdNo"/>
<Data type="Entry" fieldtype="Checkbox" name="ConductedIMEYes"
fieldname="ConductedIMEYes"/>
<Data type="Entry" fieldtype="Checkbox" name="ConductedIMENo"
fieldname="ConductedIMENo"/>
<Data type="Entry" fieldtype="Checkbox" name="ContemplateSchedulingYes"
fieldname="ContemplateSchedulingYes"/>
<Data type="Entry" fieldtype="Checkbox" name="ContemplateSchedulingNo"
fieldname="ContemplateSchedulingNo"/>
<Data type="Entry" fieldtype="Text" name="NatureOfInjury"
fieldname="NatureOfInjury" size="30" maxlength="30"/>
<Data type="Merge" fieldtype="Text" name="AdjusterName"
fieldname="AdjusterName" size="30" maxlength="30"/>
<Data type="Merge" fieldtype="Text" name="AdjusterPhone"
fieldname="AdjusterPhone" size="30" maxlength="30"/>
</RequiredData>
</Form>
Any help would be greatly appreciated.
--
Joe
VB.NET/C#/ASP.NET/ASP/VB/C++/Web and DB development/VBA Automation
推荐答案
如果我读得正确你只是将控件添加到页面,但不是
指定位置。
您可能需要查看用于添加控件的占位符。
-
Curt Christianson
网站: http://www.darkfalz.com
博客: http://blog.darkfalz.com
" Joe"写道:
if I read it right you are simply adding the controls to the page, but not
specifying where.
You may want to look at the placeholder to use to add your controls to.
--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com
"Joe" wrote:
大家好:
我正在尝试使用文字内容和
控件(文本框和复选框)动态填充网页(最终两个按钮 - 按钮
还没有出现在代码中。)我读了一个xml文件,并使用从中检索的值
来确定应该显示哪些文本以及应该控制哪些控件
最重要的是 - 应该呈现那些控件。
最终的目标是让一些文本后跟一个控件来捕获用户的响应并发布它返回到服务器。例如
页面可能会显示:
请输入美元金额:[文本框转到此处]。
这是一个意外吗?[复选框是的]是[复选框否]否
问题是所有控件都呈现在页面顶部
并且所有文本都在关闭html标记之后呈现。我不知道不知道为什么
这是一个而且我对Render方法不太了解,可以聪明地谈论它。我希望我已经清楚地解释了我想要做什么。如果不是,请告诉我。
代码在这里:
结构DynamicControl
Dim Type As String
Dim FieldType As String
Dim Name as String
Dim FieldName As String
Dim Size as String
Dim MaxLength As String
Dim EntryType As String
结束
私有文档作为XmlDocument
私有行作为XmlNodeList
私有ReqData作为XmlNodeList
私有子Page_Load(ByVal发送者作为System.Object,ByVal e As
System.EventArgs)处理MyBase.Load
Response.BufferOutput = True
Dim Line为XmlNode
Dim ChildNode为XmlNode
Dim DynamicEntry为XmlNode
输出=新的HtmlTextWriter(txtWtr)
DOC =新的XmlDocument
doc.Load(QUOT; C:\SampleForm.xml")
线路= doc.GetElementsByTagName (QUOT;线")
ReqData = doc.GetElementsByTagName(" Data")
对于每一行的行
如果Line.HasChildNodes那么
为每个ChildNode在行。 ChildNodes
Dim attrList As XmlAttributeCollection =
ChildNode.Attributes
如果不是(attrList什么都没有)那么,Dim DynCtl As DynamicControl =
ParseDynamicCtrlData(attrList.GetNamedItem(") id。)。V alue)
Select Case DynCtl.FieldType.ToLower
Case"复选框"
Dim c As CheckBox = New CheckBox
c.ID = attrList.GetNamedItem(" id")。值
c.Text = DynCtl.Name
Me.Controls(1).Controls.Add(c)
案例"文字
Dim t As TextBox = New TextBox
t.ID = attrList.GetNamedItem(" id")。Value
t.MaxLength = CType(DynCtl.MaxLength,Integer)
t.Text = DynCtl.Name
Me.Controls(1).Controls.Add(t)
结束选择
其他
Dim lit as Literal = New Literal
lit.Text = Line.InnerText& < br />"
Me.Controls.Add(lit)
结束如果
下一页
其他
Dim lit as Literal = New Literal
lit.Text = Line.InnerText& < br />"
Me.Controls.Add(点亮)
结束如果
下一页
结束子
私人功能ParseDynamicCtrlData (ByVal id As String)As
DynamicControl
Dim DataNode As XmlNode
Dim dc As DynamicControl
对于ReqData中的每个DataNode
如果String.Compare( DataNode.Attributes(QUOT;名称")值,ID)= 0然后
dc.FieldType = DataNode.Attributes(QUOT;字段类型"。)值
如果dc.FieldType.ToLower = QUOT;文本" ;然后
如果String.Compare(DataNode.Attributes(" type")。Value,
" merge")<> 0然后
dc.FieldName = DataNode.Attributes(" fieldname")。值
dc.Name = DataNode.Attributes(" name")。值
dc.Size = DataNode。属性(大小)。值
dc.MaxLength = DataNode.Attributes(" maxlength")。值
结束如果
ElseIf dc.FieldType.ToLower =" ;复选框"然后
dc.FieldName = DataNode.Attributes(" fieldname")。值
dc.Name = DataNode.Attributes(" name")。值
结束如果
退出
结束如果
返回DC
结束功能
XML在这里:
< br&>< Form>
< Content>
< Line>< Dynamic type =" text" id =" DateField" />< / Line>
< Line />
< Line>< Dynamic type =" text" id =" CustomAddress1" />< / Line>
< Line>< Dynamic type =" text" id =" CustomAddress2" />< / Line>
< Line>< Dynamic type =" text" id =" CustomAddress3" />< / Line>
< Line>< Dynamic type =" text" id =" CustomAddress4" />< / Line>
< Line />
< Line />
< Line> RE:您的文件#:<动态类型=" text" id =" YourFile" />< / Line>
< Line>您的被保险人:< Dynamic type =" text" id =" YourInsured" />< / Line>
< Line>我们的文件#:<动态类型=" text" id =" OurFile" />< / Line>
< Line>我们的被保险人:< Dynamic type =" text" id =" OurInsured" />< / Line>
< Line>损失日期:< Dynamic type =" text" id =" DateOfLoss" />< / Line>
< Line />
< Line>我们要求您完成以下关于
您的否 - 上述被保险人的故障文件。< / Line>
<行/>
<行>医疗付费:<动态类型=" text" id =" MedicalPaid" />< / Line>
< Line>支付的工资损失:< Dynamic type =" text" ID = QUOT; WageLossPaid" />< /线路>
<线>基本服务付费:其中动态类型= QUOT;文本"
ID = QUOT; EssentialServicesPaid" />< / Line>
< Line>建议是否通过阈值:< Dynamic
type ="复选框" ID = QUOT; AdviseThresholdYes" />是<动态类型="复选框"
id =" AdviseThresholdNo" />否< / Line>
< Line>您此时是否进行过IME? < Dynamic
type ="复选框" ID = QUOT; ConductedIMEYes" />是< Dynamic
type ="复选框" ID = QUOT; ConductedIMENo" />否< / Line>
< Line>如果没有,您是否考虑安排一个? < Dynamic
type ="复选框" ID = QUOT; ContemplateSchedulingYes" />是< Dynamic
type ="复选框" ID = QUOT; ContemplateSchedulingNo" />否< / Line>
< Line>受伤的性质<动态类型=" text" id =" NatureOfInjury" />< / Line>
< Line>感谢您的合作,并附上回邮信封
以方便您使用。< / Line> >< Line />
< Line>此致< / Line>
<行/>
<行/>
<行/ >
< Line />
< Line>< Dynamic type =" text" id =" AdjusterName" />< / Line>
< Line>< Dynamic type =" text" id =" AdjusterPhone" />< / Line>
< Line />
< Line>声明部门< / Line>
< Line />
< Line />
< Line> WB-204(12-99)< / Line>
< / Content>
< RequiredData>
< Data fieldtype =" NowDate" name =" DateField" />
< Data type =" Entry"字段类型= QUOT;文本" name =" CustomAddress1"
fieldname =" CustomAddress1"大小= QUOT; 30英寸; maxlength =" 30">
< Data type =" Entry"字段类型= QUOT;文本" name =" CustomAddress2"
fieldname =" CustomAddress2"大小= QUOT; 30英寸; maxlength =" 30">
< Data type =" Entry"字段类型= QUOT;文本" name =" CustomAddress3"
fieldname =" CustomAddress3"大小= QUOT; 30英寸; maxlength =" 30">
< Data type =" Entry"字段类型= QUOT;文本" name =" CustomAddress4"
fieldname =" CustomAddress4"大小= QUOT; 30英寸; maxlength =" 30">
< Data type =" Entry"字段类型= QUOT;文本"名称= QUOT; YourFile" fieldname =" YourFile"
size =" 30" maxlength =" 30">
< Data type =" Entry"字段类型= QUOT;文本" name =" YourInsured"
fieldname =" YourInsured"大小= QUOT; 30英寸; maxlength =" 30">
< Data type =" Entry"字段类型= QUOT;文本"名称= QUOT; OurFile" fieldname =" OurFile"
size =" 30" maxlength =" 30">
< Data type =" Entry"字段类型= QUOT;文本" name =" OurInsured"
fieldname =" OurInsured"大小= QUOT; 30英寸; maxlength =" 30">
< Data type =" Entry"字段类型= QUOT;文本" name =" DateOfLoss"
fieldname =" DateOfLoss"大小= QUOT; 30英寸; maxlength =" 30">
< Data type =" Entry"字段类型= QUOT;文本" name =" MedicalPaid"
fieldname =" MedicalPaid"大小= QUOT; 30英寸; MAXLENGTH = QUOT; 20" entrytype =" Numeric" />
< Data type =" Entry"字段类型= QUOT;文本" name =" WageLossPaid"
fieldname =" WageLossPaid"大小= QUOT; 30英寸; MAXLENGTH = QUOT; 20" entrytype =" Numeric" />
< Data type =" Entry"字段类型= QUOT;文本" name =" EssentialServicesPaid"
fieldname =" EssentialServicesPaid"大小= QUOT; 30英寸; maxlength =" 20"
entrytype =" Numeric" />
< Data type =" Entry"字段类型= QUOT;复选框" name =" AdviseThresholdYes"
fieldname =" AdviseThresholdYes" />
< Data type =" Entry"字段类型= QUOT;复选框" name =" AdviseThresholdNo"
fieldname =" AdviseThresholdNo" />
< Data type =" Entry"字段类型= QUOT;复选框" name =" ConductedIMEYes"
fieldname =" ConductedIMEYes" />
< Data type =" Entry"字段类型= QUOT;复选框" name =" ConductedIMENo"
fieldname =" ConductedIMENo" />
< Data type =" Entry"字段类型= QUOT;复选框" name =" ContemplateSchedulingYes"
fieldname =" ContemplateSchedulingYes" />
< Data type =" Entry"字段类型= QUOT;复选框" name =" ContemplateSchedulingNo"
fieldname =" ContemplateSchedulingNo" />
< Data type =" Entry"字段类型= QUOT;文本" name =" NatureOfInjury"
fieldname =" NatureOfInjury"大小= QUOT; 30英寸; maxlength =" 30" />
< Data type =" Merge"字段类型= QUOT;文本" name =" AdjusterName"
fieldname =" AdjusterName"大小= QUOT; 30英寸; maxlength =" 30" />
< Data type =" Merge"字段类型= QUOT;文本" name =" AdjusterPhone"
fieldname =" AdjusterPhone"大小= QUOT; 30英寸; maxlength =" 30">
< / RequiredData>
< / Form>
任何帮助将不胜感激。
-
Joe
VB.NET/C#/ASP.NET/ASP/VB/C++/Web和数据库开发/ VBA自动化
Hello All:
I am trying to dynamically populate a web page with literal content and
controls (textboxes and checkboxes (and eventually two buttons - the buttons
do not appear in the code yet). I read an xml file and, using the values
retrieved from it, determine what text should be displayed and which controls
should be rendered and - most importantly - where those controls should be
rendered.
The ultimate goal is to have some text followed by a control that will
capture the users response and post it back to the server. For example the
page might show:
Please enter the dollar amount: [textbox goes here].
Was this an accident? [checkbox for yes] Yes [checkbox for no] No
The problem is that all of the controls are rendered at the top of the page
and all of the text renders after the closing html tag. I don''t know why
this is and I don''t know enough about the Render method to speak
intelligently about it. I hope that I have explained clearly what I am
trying to do. If not please let me know.
The code is here:
Structure DynamicControl
Dim Type As String
Dim FieldType As String
Dim Name As String
Dim FieldName As String
Dim Size As String
Dim MaxLength As String
Dim EntryType As String
End Structure
Private doc As XmlDocument
Private Lines As XmlNodeList
Private ReqData As XmlNodeList
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Response.BufferOutput = True
Dim Line As XmlNode
Dim ChildNode As XmlNode
Dim DynamicEntry As XmlNode
output = New HtmlTextWriter(txtWtr)
doc = New XmlDocument
doc.Load("C:\SampleForm.xml")
Lines = doc.GetElementsByTagName("Line")
ReqData = doc.GetElementsByTagName("Data")
For Each Line In Lines
If Line.HasChildNodes Then
For Each ChildNode In Line.ChildNodes
Dim attrList As XmlAttributeCollection =
ChildNode.Attributes
If Not (attrList Is Nothing) Then
Dim DynCtl As DynamicControl =
ParseDynamicCtrlData(attrList.GetNamedItem("id").V alue)
Select Case DynCtl.FieldType.ToLower
Case "checkbox"
Dim c As CheckBox = New CheckBox
c.ID = attrList.GetNamedItem("id").Value
c.Text = DynCtl.Name
Me.Controls(1).Controls.Add(c)
Case "text"
Dim t As TextBox = New TextBox
t.ID = attrList.GetNamedItem("id").Value
t.MaxLength = CType(DynCtl.MaxLength, Integer)
t.Text = DynCtl.Name
Me.Controls(1).Controls.Add(t)
End Select
Else
Dim lit As Literal = New Literal
lit.Text = Line.InnerText & "<br/>"
Me.Controls.Add(lit)
End If
Next
Else
Dim lit As Literal = New Literal
lit.Text = Line.InnerText & "<br/>"
Me.Controls.Add(lit)
End If
Next
End Sub
Private Function ParseDynamicCtrlData(ByVal id As String) As
DynamicControl
Dim DataNode As XmlNode
Dim dc As DynamicControl
For Each DataNode In ReqData
If String.Compare(DataNode.Attributes("name").Value, id) = 0 Then
dc.FieldType = DataNode.Attributes("fieldtype").Value
If dc.FieldType.ToLower = "text" Then
If String.Compare(DataNode.Attributes("type").Value,
"merge") <> 0 Then
dc.FieldName = DataNode.Attributes("fieldname").Value
dc.Name = DataNode.Attributes("name").Value
dc.Size = DataNode.Attributes("size").Value
dc.MaxLength = DataNode.Attributes("maxlength").Value
End If
ElseIf dc.FieldType.ToLower = "checkbox" Then
dc.FieldName = DataNode.Attributes("fieldname").Value
dc.Name = DataNode.Attributes("name").Value
End If
Exit For
End If
Next
Return dc
End Function
The XML is here:
<Form>
<Content>
<Line><Dynamic type="text" id="DateField"/></Line>
<Line/>
<Line><Dynamic type="text" id="CustomAddress1"/></Line>
<Line><Dynamic type="text" id="CustomAddress2"/></Line>
<Line><Dynamic type="text" id="CustomAddress3"/></Line>
<Line><Dynamic type="text" id="CustomAddress4"/></Line>
<Line/>
<Line/>
<Line>RE: Your File #: <Dynamic type="text" id="YourFile"/></Line>
<Line> Your Insured: <Dynamic type="text" id="YourInsured"/></Line>
<Line> Our File #: <Dynamic type="text" id="OurFile"/></Line>
<Line> Our Insured: <Dynamic type="text" id="OurInsured"/></Line>
<Line> Date of Loss: <Dynamic type="text" id="DateOfLoss"/></Line>
<Line/>
<Line>We are asking you to please complete the following with regard to
your No-Fault file on the above mentioned insured.</Line>
<Line/>
<Line>Medical paid: <Dynamic type="text" id="MedicalPaid"/></Line>
<Line>Wage Loss paid: <Dynamic type="text" id="WageLossPaid"/></Line>
<Line>Essential Services paid: <Dynamic type="text"
id="EssentialServicesPaid"/></Line>
<Line>Advise if threshold passed: <Dynamic
type="checkbox" id="AdviseThresholdYes"/> Yes <Dynamic type="checkbox"
id="AdviseThresholdNo"/> No</Line>
<Line>Have you conducted an IME at this time? <Dynamic
type="checkbox" id="ConductedIMEYes"/> Yes <Dynamic
type="checkbox" id="ConductedIMENo"/> No</Line>
<Line>If not, do you contemplate scheduling one? <Dynamic
type="checkbox" id="ContemplateSchedulingYes"/> Yes <Dynamic
type="checkbox" id="ContemplateSchedulingNo"/> No</Line>
<Line>Nature of injury <Dynamic type="text" id="NatureOfInjury"/></Line>
<Line>We thank you for your cooperation and are enclosing a return envelope
for your convenience.</Line>
<Line/>
<Line>Sincerely,</Line>
<Line/>
<Line/>
<Line/>
<Line/>
<Line><Dynamic type="text" id="AdjusterName"/></Line>
<Line><Dynamic type="text" id="AdjusterPhone"/></Line>
<Line/>
<Line>Claims Department</Line>
<Line/>
<Line/>
<Line>WB-204 (12-99)</Line>
</Content>
<RequiredData>
<Data fieldtype="NowDate" name="DateField"/>
<Data type="Entry" fieldtype="Text" name="CustomAddress1"
fieldname="CustomAddress1" size="30" maxlength="30"/>
<Data type="Entry" fieldtype="Text" name="CustomAddress2"
fieldname="CustomAddress2" size="30" maxlength="30"/>
<Data type="Entry" fieldtype="Text" name="CustomAddress3"
fieldname="CustomAddress3" size="30" maxlength="30"/>
<Data type="Entry" fieldtype="Text" name="CustomAddress4"
fieldname="CustomAddress4" size="30" maxlength="30"/>
<Data type="Entry" fieldtype="Text" name="YourFile" fieldname="YourFile"
size="30" maxlength="30"/>
<Data type="Entry" fieldtype="Text" name="YourInsured"
fieldname="YourInsured" size="30" maxlength="30"/>
<Data type="Entry" fieldtype="Text" name="OurFile" fieldname="OurFile"
size="30" maxlength="30"/>
<Data type="Entry" fieldtype="Text" name="OurInsured"
fieldname="OurInsured" size="30" maxlength="30"/>
<Data type="Entry" fieldtype="Text" name="DateOfLoss"
fieldname="DateOfLoss" size="30" maxlength="30"/>
<Data type="Entry" fieldtype="Text" name="MedicalPaid"
fieldname="MedicalPaid" size="30" maxlength="20" entrytype="Numeric"/>
<Data type="Entry" fieldtype="Text" name="WageLossPaid"
fieldname="WageLossPaid" size="30" maxlength="20" entrytype="Numeric"/>
<Data type="Entry" fieldtype="Text" name="EssentialServicesPaid"
fieldname="EssentialServicesPaid" size="30" maxlength="20"
entrytype="Numeric"/>
<Data type="Entry" fieldtype="Checkbox" name="AdviseThresholdYes"
fieldname="AdviseThresholdYes"/>
<Data type="Entry" fieldtype="Checkbox" name="AdviseThresholdNo"
fieldname="AdviseThresholdNo"/>
<Data type="Entry" fieldtype="Checkbox" name="ConductedIMEYes"
fieldname="ConductedIMEYes"/>
<Data type="Entry" fieldtype="Checkbox" name="ConductedIMENo"
fieldname="ConductedIMENo"/>
<Data type="Entry" fieldtype="Checkbox" name="ContemplateSchedulingYes"
fieldname="ContemplateSchedulingYes"/>
<Data type="Entry" fieldtype="Checkbox" name="ContemplateSchedulingNo"
fieldname="ContemplateSchedulingNo"/>
<Data type="Entry" fieldtype="Text" name="NatureOfInjury"
fieldname="NatureOfInjury" size="30" maxlength="30"/>
<Data type="Merge" fieldtype="Text" name="AdjusterName"
fieldname="AdjusterName" size="30" maxlength="30"/>
<Data type="Merge" fieldtype="Text" name="AdjusterPhone"
fieldname="AdjusterPhone" size="30" maxlength="30"/>
</RequiredData>
</Form>
Any help would be greatly appreciated.
--
Joe
VB.NET/C#/ASP.NET/ASP/VB/C++/Web and DB development/VBA Automation
Curt,
因为我不知道我为给定页面添加了多少控件
(由xml决定),我怎么处理不知道要添加多少占位符的b / b
的含糊不清?
-
Joe
VB.NET/C#/ASP.NET/ASP/VB/C++/Web和数据库开发/ VBA自动化
" Curt_C [MVP]"写道:
Curt,
Since I will have no idea how many controls I am adding for a given page
(that is determined by the xml), how would I handle the ambiguity of not
knowing how many placeholders to add?
--
Joe
VB.NET/C#/ASP.NET/ASP/VB/C++/Web and DB development/VBA Automation
"Curt_C [MVP]" wrote:
如果我读得正确你只是将控件添加到页面,但不是
指定在哪里。
你可能想看看占位符用来添加你的控件。
-
Curt Christianson
网站: http://www.darkfalz.com
博客: http://blog.darkfalz.com
乔写道:
if I read it right you are simply adding the controls to the page, but not
specifying where.
You may want to look at the placeholder to use to add your controls to.
--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com
"Joe" wrote:
大家好:
我正在尝试使用文字内容和
控件(文本框和复选框)动态填充网页(最终两个按钮 - 按钮
还没有出现在代码中。)我读了一个xml文件,并使用从中检索的值
来确定应该显示哪些文本以及应该控制哪些控件
最重要的是 - 应该呈现那些控件。
最终的目标是让一些文本后跟一个控件来捕获用户的响应并发布它返回到服务器。例如
页面可能会显示:
请输入美元金额:[文本框转到此处]。
这是一个意外吗?[复选框是的]是[复选框否]否
问题是所有控件都呈现在页面顶部
并且所有文本都在关闭html标记之后呈现。我不知道不知道为什么
这是一个d我不太了解渲染方法,而是聪明地谈论它。我希望我已经清楚地解释了我想要做什么。如果不是,请告诉我。
代码在这里:
结构DynamicControl
Dim Type As String
Dim FieldType As String
Dim Name as String
Dim FieldName As String
Dim Size as String
Dim MaxLength As String
Dim EntryType As String
结束
私有文档作为XmlDocument
私有行作为XmlNodeList
私有ReqData作为XmlNodeList
私有子Page_Load(ByVal发送者作为System.Object,ByVal e As
System.EventArgs)处理MyBase.Load
Response.BufferOutput = True
Dim Line为XmlNode
Dim ChildNode为XmlNode
Dim DynamicEntry为XmlNode
输出=新的HtmlTextWriter(txtWtr)
DOC =新的XmlDocument
doc.Load(QUOT; C:\SampleForm.xml")
线路= doc.GetElementsByTagName (QUOT;线")
ReqData = doc.GetElementsByTagName(" Data")
对于每一行的行
如果Line.HasChildNodes那么
为每个ChildNode在行。 ChildNodes
Dim attrList As XmlAttributeCollection =
ChildNode.Attributes
如果不是(attrList什么都没有)那么,Dim DynCtl As DynamicControl =
ParseDynamicCtrlData(attrList.GetNamedItem(") id。)。V alue)
Select Case DynCtl.FieldType.ToLower
Case"复选框"
Dim c As CheckBox = New CheckBox
c.ID = attrList.GetNamedItem(" id")。值
c.Text = DynCtl.Name
Me.Controls(1).Controls.Add(c)
案例"文字
Dim t As TextBox = New TextBox
t.ID = attrList.GetNamedItem(" id")。Value
t.MaxLength = CType(DynCtl.MaxLength,Integer)
t.Text = DynCtl.Name
Me.Controls(1).Controls.Add(t)
结束选择
其他
Dim lit as Literal = New Literal
lit.Text = Line.InnerText& < br />"
Me.Controls.Add(lit)
结束如果
下一页
其他
Dim lit as Literal = New Literal
lit.Text = Line.InnerText& < br />"
Me.Controls.Add(点亮)
结束如果
下一页
结束子
私人功能ParseDynamicCtrlData (ByVal id As String)As
DynamicControl
Dim DataNode As XmlNode
Dim dc As DynamicControl
对于ReqData中的每个DataNode
如果String.Compare( DataNode.Attributes("name").Value, id) = 0 Then
dc.FieldType = DataNode.Attributes("fieldtype").Value
If dc.FieldType.ToLower = "text" ; Then
If String.Compare(DataNode.Attributes("type").Value,
"merge") <> 0 Then
dc.FieldName = DataNode.Attributes("fieldname").Value
dc.Name = DataNode.Attributes("name").Value
dc.Size = DataNode.Attributes("size").Value
dc.MaxLength = DataNode.Attributes("maxlength").Value
End If
ElseIf dc.FieldType.ToLower = "checkbox" Then
dc.FieldName = DataNode.Attributes("fieldname").Value
dc.Name = DataNode.Attributes("name").Value
End If
Exit For
End If
Next
Return dc
End Function
The XML is here:
<Form>
<Content>
\t<Line><Dynamic type="text" id="DateField"/></Line>
\t<Line/>
\t<Line><Dynamic type="text" id="CustomAddress1"/></Line>
\t<Line><Dynamic type="text" id="CustomAddress2"/></Line>
\t<Line><Dynamic type="text" id="CustomAddress3"/></Line>
\t<Line><Dynamic type="text" id="CustomAddress4"/></Line>
\t<Line/>
\t<Line/>
\t<Line>RE: Your File #: <Dynamic type="text" id="YourFile"/></Line>
\t<Line> Your Insured: <Dynamic type="text" id="YourInsured"/></Line>
\t<Line> Our File #: <Dynamic type="text" id="OurFile"/></Line>
\t<Line> Our Insured: <Dynamic type="text" id="OurInsured"/></Line>
\t<Line> Date of Loss: <Dynamic type="text" id="DateOfLoss"/></Line>
\t<Line/>
\t<Line>We are asking you to please complete the following with regard to
your No-Fault file on the above mentioned insured.</Line>
\t<Line/>
\t<Line>Medical paid: <Dynamic type="text" id="MedicalPaid"/></Line>
\t<Line>Wage Loss paid: <Dynamic type="text" id="WageLossPaid"/></Line>
\t<Line>Essential Services paid: <Dynamic type="text"
id="EssentialServicesPaid"/></Line>
\t<Line>Advise if threshold passed: <Dynamic
type="checkbox" id="AdviseThresholdYes"/> Yes\t\t<Dynamic type="checkbox"
id="AdviseThresholdNo"/> No</Line>
\t<Line>Have you conducted an IME at this time? <Dynamic
type="checkbox" id="ConductedIMEYes"/> Yes \t<Dynamic
type="checkbox" id="ConductedIMENo"/> No</Line>
\t<Line>If not, do you contemplate scheduling one? <Dynamic
type="checkbox" id="ContemplateSchedulingYes"/> Yes <Dynamic
type="checkbox" id="ContemplateSchedulingNo"/> No</Line>
\t<Line>Nature of injury <Dynamic type="text" id="NatureOfInjury"/></Line>
\t<Line>We thank you for your cooperation and are enclosing a return envelope
for your convenience.</Line>
\t<Line/>
\t<Line>Sincerely,</Line>
\t<Line/>
\t<Line/>
\t<Line/>
\t<Line/>
\t<Line><Dynamic type="text" id="AdjusterName"/></Line>
\t<Line><Dynamic type="text" id="AdjusterPhone"/></Line>
\t<Line/>
\t<Line>Claims Department</Line>
\t<Line/>
\t<Line/>
\t<Line>WB-204 (12-99)</Line>
</Content>
<RequiredData>
\t<Data fieldtype="NowDate" name="DateField"/>
\t<Data type="Entry" fieldtype="Text" name="CustomAddress1"
fieldname="CustomAddress1"大小= QUOT; 30英寸; maxlength="30"/>
\t<Data type="Entry" fieldtype="Text" name="CustomAddress2"
fieldname="CustomAddress2"大小= QUOT; 30英寸; maxlength="30"/>
\t<Data type="Entry" fieldtype="Text" name="CustomAddress3"
fieldname="CustomAddress3"大小= QUOT; 30英寸; maxlength="30"/>
\t<Data type="Entry" fieldtype="Text" name="CustomAddress4"
fieldname="CustomAddress4"大小= QUOT; 30英寸; maxlength="30"/>
\t<Data type="Entry" fieldtype="Text" name="YourFile" fieldname="YourFile"
size="30" maxlength="30"/>
\t<Data type="Entry" fieldtype="Text" name="YourInsured"
fieldname="YourInsured"大小= QUOT; 30英寸; maxlength="30"/>
\t<Data type="Entry" fieldtype="Text" name="OurFile" fieldname="OurFile"
size="30" maxlength="30"/>
\t<Data type="Entry" fieldtype="Text" name="OurInsured"
fieldname="OurInsured"大小= QUOT; 30英寸; maxlength="30"/>
\t<Data type="Entry" fieldtype="Text" name="DateOfLoss"
fieldname="DateOfLoss"大小= QUOT; 30英寸; maxlength="30"/>
\t<Data type="Entry" fieldtype="Text" name="MedicalPaid"
fieldname="MedicalPaid"大小= QUOT; 30英寸; MAXLENGTH = QUOT; 20" entrytype="Numeric"/>
\t<Data type="Entry" fieldtype="Text" name="WageLossPaid"
fieldname="WageLossPaid"大小= QUOT; 30英寸; MAXLENGTH = QUOT; 20" entrytype="Numeric"/>
\t<Data type="Entry" fieldtype="Text" name="EssentialServicesPaid"
fieldname="EssentialServicesPaid"大小= QUOT; 30英寸; maxlength="20"
entrytype="Numeric"/>
\t<Data type="Entry" fieldtype="Checkbox" name="AdviseThresholdYes"
fieldname="AdviseThresholdYes"/>
\t<Data type="Entry" fieldtype="Checkbox" name="AdviseThresholdNo"
fieldname="AdviseThresholdNo"/>
\t<Data type="Entry" fieldtype="Checkbox" name="ConductedIMEYes"
fieldname="ConductedIMEYes"/>
\t<Data type="Entry" fieldtype="Checkbox" name="ConductedIMENo"
fieldname="ConductedIMENo"/>
\t<Data type="Entry" fieldtype="Checkbox" name="ContemplateSchedulingYes"
fieldname="ContemplateSchedulingYes"/>
\t<Data type="Entry" fieldtype="Checkbox" name="ContemplateSchedulingNo"
fieldname="ContemplateSchedulingNo"/>
\t<Data type="Entry" fieldtype="Text" name="NatureOfInjury"
fieldname="NatureOfInjury"大小= QUOT; 30英寸; maxlength="30"/>
\t<Data type="Merge" fieldtype="Text" name="AdjusterName"
fieldname="AdjusterName"大小= QUOT; 30英寸; maxlength="30"/>
\t<Data type="Merge" fieldtype="Text" name="AdjusterPhone"
fieldname="AdjusterPhone"大小= QUOT; 30英寸; maxlength="30"/>
</RequiredData>
</Form>
Any help would be greatly appreciated.
--
Joe
VB.NET/C#/ASP.NET/ASP/VB/C++/Web and DB development/VBA Automation
Hello All:
I am trying to dynamically populate a web page with literal content and
controls (textboxes and checkboxes (and eventually two buttons - the buttons
do not appear in the code yet). I read an xml file and, using the values
retrieved from it, determine what text should be displayed and which controls
should be rendered and - most importantly - where those controls should be
rendered.
The ultimate goal is to have some text followed by a control that will
capture the users response and post it back to the server. For example the
page might show:
Please enter the dollar amount: [textbox goes here].
Was this an accident? [checkbox for yes] Yes [checkbox for no] No
The problem is that all of the controls are rendered at the top of the page
and all of the text renders after the closing html tag. I don''t know why
this is and I don''t know enough about the Render method to speak
intelligently about it. I hope that I have explained clearly what I am
trying to do. If not please let me know.
The code is here:
Structure DynamicControl
Dim Type As String
Dim FieldType As String
Dim Name As String
Dim FieldName As String
Dim Size As String
Dim MaxLength As String
Dim EntryType As String
End Structure
Private doc As XmlDocument
Private Lines As XmlNodeList
Private ReqData As XmlNodeList
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Response.BufferOutput = True
Dim Line As XmlNode
Dim ChildNode As XmlNode
Dim DynamicEntry As XmlNode
output = New HtmlTextWriter(txtWtr)
doc = New XmlDocument
doc.Load("C:\SampleForm.xml")
Lines = doc.GetElementsByTagName("Line")
ReqData = doc.GetElementsByTagName("Data")
For Each Line In Lines
If Line.HasChildNodes Then
For Each ChildNode In Line.ChildNodes
Dim attrList As XmlAttributeCollection =
ChildNode.Attributes
If Not (attrList Is Nothing) Then
Dim DynCtl As DynamicControl =
ParseDynamicCtrlData(attrList.GetNamedItem("id").V alue)
Select Case DynCtl.FieldType.ToLower
Case "checkbox"
Dim c As CheckBox = New CheckBox
c.ID = attrList.GetNamedItem("id").Value
c.Text = DynCtl.Name
Me.Controls(1).Controls.Add(c)
Case "text"
Dim t As TextBox = New TextBox
t.ID = attrList.GetNamedItem("id").Value
t.MaxLength = CType(DynCtl.MaxLength, Integer)
t.Text = DynCtl.Name
Me.Controls(1).Controls.Add(t)
End Select
Else
Dim lit As Literal = New Literal
lit.Text = Line.InnerText & "<br/>"
Me.Controls.Add(lit)
End If
Next
Else
Dim lit As Literal = New Literal
lit.Text = Line.InnerText & "<br/>"
Me.Controls.Add(lit)
End If
Next
End Sub
Private Function ParseDynamicCtrlData(ByVal id As String) As
DynamicControl
Dim DataNode As XmlNode
Dim dc As DynamicControl
For Each DataNode In ReqData
If String.Compare(DataNode.Attributes("name").Value, id) = 0 Then
dc.FieldType = DataNode.Attributes("fieldtype").Value
If dc.FieldType.ToLower = "text" Then
If String.Compare(DataNode.Attributes("type").Value,
"merge") <> 0 Then
dc.FieldName = DataNode.Attributes("fieldname").Value
dc.Name = DataNode.Attributes("name").Value
dc.Size = DataNode.Attributes("size").Value
dc.MaxLength = DataNode.Attributes("maxlength").Value
End If
ElseIf dc.FieldType.ToLower = "checkbox" Then
dc.FieldName = DataNode.Attributes("fieldname").Value
dc.Name = DataNode.Attributes("name").Value
End If
Exit For
End If
Next
Return dc
End Function
The XML is here:
<Form>
<Content>
<Line><Dynamic type="text" id="DateField"/></Line>
<Line/>
<Line><Dynamic type="text" id="CustomAddress1"/></Line>
<Line><Dynamic type="text" id="CustomAddress2"/></Line>
<Line><Dynamic type="text" id="CustomAddress3"/></Line>
<Line><Dynamic type="text" id="CustomAddress4"/></Line>
<Line/>
<Line/>
<Line>RE: Your File #: <Dynamic type="text" id="YourFile"/></Line>
<Line> Your Insured: <Dynamic type="text" id="YourInsured"/></Line>
<Line> Our File #: <Dynamic type="text" id="OurFile"/></Line>
<Line> Our Insured: <Dynamic type="text" id="OurInsured"/></Line>
<Line> Date of Loss: <Dynamic type="text" id="DateOfLoss"/></Line>
<Line/>
<Line>We are asking you to please complete the following with regard to
your No-Fault file on the above mentioned insured.</Line>
<Line/>
<Line>Medical paid: <Dynamic type="text" id="MedicalPaid"/></Line>
<Line>Wage Loss paid: <Dynamic type="text" id="WageLossPaid"/></Line>
<Line>Essential Services paid: <Dynamic type="text"
id="EssentialServicesPaid"/></Line>
<Line>Advise if threshold passed: <Dynamic
type="checkbox" id="AdviseThresholdYes"/> Yes <Dynamic type="checkbox"
id="AdviseThresholdNo"/> No</Line>
<Line>Have you conducted an IME at this time? <Dynamic
type="checkbox" id="ConductedIMEYes"/> Yes <Dynamic
type="checkbox" id="ConductedIMENo"/> No</Line>
<Line>If not, do you contemplate scheduling one? <Dynamic
type="checkbox" id="ContemplateSchedulingYes"/> Yes <Dynamic
type="checkbox" id="ContemplateSchedulingNo"/> No</Line>
<Line>Nature of injury <Dynamic type="text" id="NatureOfInjury"/></Line>
<Line>We thank you for your cooperation and are enclosing a return envelope
for your convenience.</Line>
<Line/>
<Line>Sincerely,</Line>
<Line/>
<Line/>
<Line/>
<Line/>
<Line><Dynamic type="text" id="AdjusterName"/></Line>
<Line><Dynamic type="text" id="AdjusterPhone"/></Line>
<Line/>
<Line>Claims Department</Line>
<Line/>
<Line/>
<Line>WB-204 (12-99)</Line>
</Content>
<RequiredData>
<Data fieldtype="NowDate" name="DateField"/>
<Data type="Entry" fieldtype="Text" name="CustomAddress1"
fieldname="CustomAddress1" size="30" maxlength="30"/>
<Data type="Entry" fieldtype="Text" name="CustomAddress2"
fieldname="CustomAddress2" size="30" maxlength="30"/>
<Data type="Entry" fieldtype="Text" name="CustomAddress3"
fieldname="CustomAddress3" size="30" maxlength="30"/>
<Data type="Entry" fieldtype="Text" name="CustomAddress4"
fieldname="CustomAddress4" size="30" maxlength="30"/>
<Data type="Entry" fieldtype="Text" name="YourFile" fieldname="YourFile"
size="30" maxlength="30"/>
<Data type="Entry" fieldtype="Text" name="YourInsured"
fieldname="YourInsured" size="30" maxlength="30"/>
<Data type="Entry" fieldtype="Text" name="OurFile" fieldname="OurFile"
size="30" maxlength="30"/>
<Data type="Entry" fieldtype="Text" name="OurInsured"
fieldname="OurInsured" size="30" maxlength="30"/>
<Data type="Entry" fieldtype="Text" name="DateOfLoss"
fieldname="DateOfLoss" size="30" maxlength="30"/>
<Data type="Entry" fieldtype="Text" name="MedicalPaid"
fieldname="MedicalPaid" size="30" maxlength="20" entrytype="Numeric"/>
<Data type="Entry" fieldtype="Text" name="WageLossPaid"
fieldname="WageLossPaid" size="30" maxlength="20" entrytype="Numeric"/>
<Data type="Entry" fieldtype="Text" name="EssentialServicesPaid"
fieldname="EssentialServicesPaid" size="30" maxlength="20"
entrytype="Numeric"/>
<Data type="Entry" fieldtype="Checkbox" name="AdviseThresholdYes"
fieldname="AdviseThresholdYes"/>
<Data type="Entry" fieldtype="Checkbox" name="AdviseThresholdNo"
fieldname="AdviseThresholdNo"/>
<Data type="Entry" fieldtype="Checkbox" name="ConductedIMEYes"
fieldname="ConductedIMEYes"/>
<Data type="Entry" fieldtype="Checkbox" name="ConductedIMENo"
fieldname="ConductedIMENo"/>
<Data type="Entry" fieldtype="Checkbox" name="ContemplateSchedulingYes"
fieldname="ContemplateSchedulingYes"/>
<Data type="Entry" fieldtype="Checkbox" name="ContemplateSchedulingNo"
fieldname="ContemplateSchedulingNo"/>
<Data type="Entry" fieldtype="Text" name="NatureOfInjury"
fieldname="NatureOfInjury" size="30" maxlength="30"/>
<Data type="Merge" fieldtype="Text" name="AdjusterName"
fieldname="AdjusterName" size="30" maxlength="30"/>
<Data type="Merge" fieldtype="Text" name="AdjusterPhone"
fieldname="AdjusterPhone" size="30" maxlength="30"/>
</RequiredData>
</Form>
Any help would be greatly appreciated.
--
Joe
VB.NET/C#/ASP.NET/ASP/VB/C++/Web and DB development/VBA Automation
Repeater perhaps.
--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com
"Joe" wrote:
Repeater perhaps.
--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com
"Joe" wrote:
Curt,
Since I will have no idea how many controls I am adding for a given page
(that is determined by the xml), how would I handle the ambiguity of not
knowing how many placeholders to add?
--
Joe
VB.NET/C#/ASP.NET/ASP/VB/C++/Web and DB development/VBA Automation
"Curt_C [MVP]" wrote:
Curt,
Since I will have no idea how many controls I am adding for a given page
(that is determined by the xml), how would I handle the ambiguity of not
knowing how many placeholders to add?
--
Joe
VB.NET/C#/ASP.NET/ASP/VB/C++/Web and DB development/VBA Automation
"Curt_C [MVP]" wrote:
if I read it right you are simply adding the controls to the page, but not
specifying where.
You may want to look at the placeholder to use to add your controls to.
--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com
"Joe" wrote:
if I read it right you are simply adding the controls to the page, but not
specifying where.
You may want to look at the placeholder to use to add your controls to.
--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com
"Joe" wrote:
Hello All:
I am trying to dynamically populate a web page with literal content and
controls (textboxes and checkboxes (and eventually two buttons - the buttons
do not appear in the code yet). I read an xml file and, using the values
retrieved from it, determine what text should be displayed and which controls
should be rendered and - most importantly - where those controls should be
rendered.
The ultimate goal is to have some text followed by a control that will
capture the users response and post it back to the server. For example the
page might show:
Please enter the dollar amount: [textbox goes here].
Was this an accident? [checkbox for yes] Yes [checkbox for no] No
The problem is that all of the controls are rendered at the top of the page
and all of the text renders after the closing html tag. I don’’t know why
this is an d I don’’t know enough about the Render method to speak
intelligently about it. I hope that I have explained clearly what I am
trying to do. If not please let me know.
The code is here:
Structure DynamicControl
Dim Type As String
Dim FieldType As String
Dim Name As String
Dim FieldName As String
Dim Size As String
Dim MaxLength As String
Dim EntryType As String
End Structure
Private doc As XmlDocument
Private Lines As XmlNodeList
Private ReqData As XmlNodeList
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Response.BufferOutput = True
Dim Line As XmlNode
Dim ChildNode As XmlNode
Dim DynamicEntry As XmlNode
output = New HtmlTextWriter(txtWtr)
doc = New XmlDocument
doc.Load("C:\SampleForm.xml")
Lines = doc.GetElementsByTagName("Line ")
ReqData = doc.GetElementsByTagName("Data")
For Each Line In Lines
If Line.HasChildNodes Then
For Each ChildNode In Line.ChildNodes
Dim attrList As XmlAttributeCollection =
ChildNode.Attributes
If Not (attrList Is Nothing) Then
Dim DynCtl As DynamicControl =
ParseDynamicCtrlData(attrList.GetNamedItem("id").V alue)
Select Case DynCtl.FieldType.ToLower
Case "checkbox"
Dim c As CheckBox = New CheckBox
c.ID = attrList.GetNamedItem("id").Value
c.Text = DynCtl.Name
Me.Controls(1).Controls.Add(c)
Case "text"
Dim t As TextBox = New TextBox
t.ID = attrList.GetNamedItem("id").Value
t.MaxLength = CType(DynCtl.MaxLength, Integer)
t.Text = DynCtl.Name
Me.Controls(1).Controls.Add(t)
End Select
Else
Dim lit As Literal = New Literal
lit.Text = Line.InnerText & "<br/>"
Me.Controls.Add(lit)
End If
Next
Else
Dim lit As Literal = New Literal
lit.Text = Line.InnerText & "<br/>"
Me.Controls.Add(lit)
End If
Next
End Sub
Private Function ParseDynamicCtrlData(ByVal id As String) As
DynamicControl
Dim DataNode As XmlNode
Dim dc As DynamicControl
For Each DataNode In ReqData
If String.Compare(DataNode.Attributes("name").Value, id) = 0 Then
dc.FieldType = DataNode.Attributes("fieldtype").Value
If dc.FieldType.ToLower = "text" Then
If String.Compare(DataNode.Attributes("type").Value,
"merge") <> 0 Then
dc.FieldName = DataNode.Attributes("fieldname").Value
dc.Name = DataNode.Attributes("name").Value
dc.Size = DataNode.Attributes("size").Value
dc.MaxLength = DataNode.Attributes("maxlength").Value
End If
ElseIf dc.FieldType.ToLower = "checkbox" Then
dc.FieldName = DataNode.Attributes("fieldname").Value
dc.Name = DataNode.Attributes("name").Value
End If
Exit For
End If
Next
Return dc
End Function
The XML is here:
<Form>
<Content>
\t<Line><Dynamic type="text" id="DateField"/></Line>
\t<Line/>
\t<Line><Dynamic type="text" id="CustomAddress1"/></Line>
\t<Line><Dynamic type="text" id="CustomAddress2"/></Line>
\t<Line><Dynamic type="text" id="CustomAddress3"/></Line>
\t<Line><Dynamic type="text" id="CustomAddress4"/></Line>
\t<Line/>
\t<Line/>
\t<Line>RE: Your File #: <Dynamic type="text" id="YourFile"/></Line>
\t<Line> Your Insured: <Dynamic type="text" id="YourInsured"/></Line>
\t<Line> Our File #: <Dynamic type="text" id="OurFile"/></Line>
\t<Line> Our Insured: <Dynamic type="text" id="OurInsured"/></Line>
\t<Line> Date of Loss: <Dynamic type="text" id="DateOfLoss"/></Line>
\t<Line/>
\t<Line>We are asking you to please complete the following with regard to
your No-Fault file on the above mentioned insured.</Line>
\t<Line/>
\t<Line>Medical paid: <Dynamic type="text" id="MedicalPaid"/></Line>
\t<Line>Wage Loss paid: <Dynamic type="text" id="WageLossPaid"/></Line>
\t<Line>Essential Services paid: <Dynamic type="text"
id="EssentialServicesPaid"/></Line>
\t<Line>Advise if threshold passed: <Dynamic
type="checkbox" id="AdviseThresholdYes"/> Yes\t\t<Dynamic type="checkbox"
id="AdviseThresholdNo"/> No</Line>
\t<Line>Have you conducted an IME at this time? <Dynamic
type="checkbox" id="ConductedIMEYes"/> Yes \t<Dynamic
type="checkbox" id="ConductedIMENo"/> No</Line>
\t<Line>If not, do you contemplate scheduling one? <Dynamic
type="checkbox" id="ContemplateSchedulingYes"/> Yes <Dynamic
type="checkbox" id="ContemplateSchedulingNo"/> No</Line>
\t<Line>Nature of injury <Dynamic type="text" id="NatureOfInjury"/></Line>
\t<Line>We thank you for your cooperation and are enclosing a return envelope
for your convenience.</Line>
\t<Line/>
\t<Line>Sincerely,</Line>
\t<Line/>
\t<Line/>
\t<Line/>
\t<Line/>
\t<Line><Dynamic type="text" id="AdjusterName"/></Line>
\t<Line><Dynamic type="text" id="AdjusterPhone"/></Line>
\t<Line/>
\t<Line>Claims Department</Line>
\t<Line/>
\t<Line/>
\t<Line>WB-204 (12-99)</Line>
</Content>
<RequiredData>
\t<Data fieldtype="NowDate" name="DateField"/>
\t<Data type="Entry" fieldtype="Text" name="CustomAddress1"
fieldname="CustomAddress1"大小= QUOT; 30英寸; maxlength="30"/>
\t<Data type="Entry" fieldtype="Text" name="CustomAddress2"
fieldname="CustomAddress2"大小= QUOT; 30英寸; maxlength="30"/>
\t<Data type="Entry" fieldtype="Text" name="CustomAddress3"
fieldname="CustomAddress3"大小= QUOT; 30英寸; maxlength="30"/>
\t<Data type="Entry" fieldtype="Text" name="CustomAddress4"
fieldname="CustomAddress4"大小= QUOT; 30英寸; maxlength="30"/>
\t<Data type="Entry" fieldtype="Text" name="YourFile" fieldname="YourFile"
size="30" maxlength="30"/>
\t<Data type="Entry" fieldtype="Text" name="YourInsured"
fieldname="YourInsured"大小= QUOT; 30英寸; maxlength="30"/>
\t<Data type="Entry" fieldtype="Text" name="OurFile" fieldname="OurFile"
size="30" maxlength="30"/>
\t<Data type="Entry" fieldtype="Text" name="OurInsured"
fieldname="OurInsured"大小= QUOT; 30英寸; maxlength="30"/>
\t<Data type="Entry" fieldtype="Text" name="DateOfLoss"
fieldname="DateOfLoss"大小= QUOT; 30英寸; maxlength="30"/>
\t<Data type="Entry" fieldtype="Text" name="MedicalPaid"
fieldname="MedicalPaid"大小= QUOT; 30英寸; MAXLENGTH = QUOT; 20" entrytype="Numeric"/>
\t<Data type="Entry" fieldtype="Text" name="WageLossPaid"
fieldname="WageLossPaid"大小= QUOT; 30英寸; MAXLENGTH = QUOT; 20" entrytype="Numeric"/>
\t<Data type="Entry" fieldtype="Text" name="EssentialServicesPaid"
fieldname="EssentialServicesPaid"大小= QUOT; 30英寸; maxlength="20"
entrytype="Numeric"/>
\t<Data type="Entry" fieldtype="Checkbox" name="AdviseThresholdYes"
fieldname="AdviseThresholdYes"/>
\t<Data type="Entry" fieldtype="Checkbox" name="AdviseThresholdNo"
fieldname="AdviseThresholdNo"/>
\t<Data type="Entry" fieldtype="Checkbox" name="ConductedIMEYes"
fieldname="ConductedIMEYes"/>
\t<Data type="Entry" fieldtype="Checkbox" name="ConductedIMENo"
fieldname="ConductedIMENo"/>
\t<Data type="Entry" fieldtype="Checkbox" name="ContemplateSchedulingYes"
fieldname="ContemplateSchedulingYes"/>
\t<Data type="Entry" fieldtype="Checkbox" name="ContemplateSchedulingNo"
fieldname="ContemplateSchedulingNo"/>
\t<Data type="Entry" fieldtype="Text" name="NatureOfInjury"
fieldname="NatureOfInjury"大小= QUOT; 30英寸; maxlength="30"/>
\t<Data type="Merge" fieldtype="Text" name="AdjusterName"
fieldname="AdjusterName"大小= QUOT; 30英寸; maxlength="30"/>
\t<Data type="Merge" fieldtype="Text" name="AdjusterPhone"
fieldname="AdjusterPhone"大小= QUOT; 30英寸; maxlength="30"/>
</RequiredData>
</Form>
Any help would be greatly appreciated.
--
Joe
VB.NET/C#/ASP.NET/ASP/VB/C++/Web and DB development/VBA Automation
Hello All:
I am trying to dynamically populate a web page with literal content and
controls (textboxes and checkboxes (and eventually two buttons - the buttons
do not appear in the code yet). I read an xml file and, using the values
retrieved from it, determine what text should be displayed and which controls
should be rendered and - most importantly - where those controls should be
rendered.
The ultimate goal is to have some text followed by a control that will
capture the users response and post it back to the server. For example the
page might show:
Please enter the dollar amount: [textbox goes here].
Was this an accident? [checkbox for yes] Yes [checkbox for no] No
The problem is that all of the controls are rendered at the top of the page
and all of the text renders after the closing html tag. I don''t know why
this is and I don''t know enough about the Render method to speak
intelligently about it. I hope that I have explained clearly what I am
trying to do. If not please let me know.
The code is here:
Structure DynamicControl
Dim Type As String
Dim FieldType As String
Dim Name As String
Dim FieldName As String
Dim Size As String
Dim MaxLength As String
Dim EntryType As String
End Structure
Private doc As XmlDocument
Private Lines As XmlNodeList
Private ReqData As XmlNodeList
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Response.BufferOutput = True
Dim Line As XmlNode
Dim ChildNode As XmlNode
Dim DynamicEntry As XmlNode
output = New HtmlTextWriter(txtWtr)
doc = New XmlDocument
doc.Load("C:\SampleForm.xml")
Lines = doc.GetElementsByTagName("Line")
ReqData = doc.GetElementsByTagName("Data")
For Each Line In Lines
If Line.HasChildNodes Then
For Each ChildNode In Line.ChildNodes
Dim attrList As XmlAttributeCollection =
ChildNode.Attributes
If Not (attrList Is Nothing) Then
Dim DynCtl As DynamicControl =
ParseDynamicCtrlData(attrList.GetNamedItem("id").V alue)
Select Case DynCtl.FieldType.ToLower
Case "checkbox"
Dim c As CheckBox = New CheckBox
c.ID = attrList.GetNamedItem("id").Value
c.Text = DynCtl.Name
Me.Controls(1).Controls.Add(c)
Case "text"
Dim t As TextBox = New TextBox
t.ID = attrList.GetNamedItem("id").Value
t.MaxLength = CType(DynCtl.MaxLength, Integer)
t.Text = DynCtl.Name
Me.Controls(1).Controls.Add(t)
End Select
Else
Dim lit As Literal = New Literal
lit.Text = Line.InnerText & "<br/>"
Me.Controls.Add(lit)
End If
Next
Else
Dim lit As Literal = New Literal
lit.Text = Line.InnerText & "<br/>"
Me.Controls.Add(lit)
End If
Next
End Sub
Private Function ParseDynamicCtrlData(ByVal id As String) As
DynamicControl
Dim DataNode As XmlNode
Dim dc As DynamicControl
For Each DataNode In ReqData
If String.Compare(DataNode.Attributes("name").Value, id) = 0 Then
dc.FieldType = DataNode.Attributes("fieldtype").Value
If dc.FieldType.ToLower = "text" Then
If String.Compare(DataNode.Attributes("type").Value,
"merge") <> 0 Then
dc.FieldName = DataNode.Attributes("fieldname").Value
dc.Name = DataNode.Attributes("name").Value
dc.Size = DataNode.Attributes("size").Value
dc.MaxLength = DataNode.Attributes("maxlength").Value
End If
ElseIf dc.FieldType.ToLower = "checkbox" Then
dc.FieldName = DataNode.Attributes("fieldname").Value
dc.Name = DataNode.Attributes("name").Value
End If
Exit For
End If
Next
Return dc
End Function
The XML is here:
<Form>
<Content>
<Line><Dynamic type="text" id="DateField"/></Line>
<Line/>
<Line><Dynamic type="text" id="CustomAddress1"/></Line>
<Line><Dynamic type="text" id="CustomAddress2"/></Line>
<Line><Dynamic type="text" id="CustomAddress3"/></Line>
<Line><Dynamic type="text" id="CustomAddress4"/></Line>
<Line/>
<Line/>
<Line>RE: Your File #: <Dynamic type="text" id="YourFile"/></Line>
<Line> Your Insured: <Dynamic type="text" id="YourInsured"/></Line>
<Line> Our File #: <Dynamic type="text" id="OurFile"/></Line>
<Line> Our Insured: <Dynamic type="text" id="OurInsured"/></Line>
<Line> Date of Loss: <Dynamic type="text" id="DateOfLoss"/></Line>
<Line/>
<Line>We are asking you to please complete the following with regard to
your No-Fault file on the above mentioned insured.</Line>
<Line/>
<Line>Medical paid: <Dynamic type="text" id="MedicalPaid"/></Line>
<Line>Wage Loss paid: <Dynamic type="text" id="WageLossPaid"/></Line>
<Line>Essential Services paid: <Dynamic type="text"
id="EssentialServicesPaid"/></Line>
<Line>Advise if threshold passed: <Dynamic
type="checkbox" id="AdviseThresholdYes"/> Yes <Dynamic type="checkbox"
id="AdviseThresholdNo"/> No</Line>
<Line>Have you conducted an IME at this time? <Dynamic
type="checkbox" id="ConductedIMEYes"/> Yes <Dynamic
type="checkbox" id="ConductedIMENo"/> No</Line>
<Line>If not, do you contemplate scheduling one? <Dynamic
type="checkbox" id="ContemplateSchedulingYes"/> Yes <Dynamic
type="checkbox" id="ContemplateSchedulingNo"/> No</Line>
<Line>Nature of injury <Dynamic type="text" id="NatureOfInjury"/></Line>
<Line>We thank you for your cooperation and are enclosing a return envelope
for your convenience.</Line>
<Line/>
<Line>Sincerely,</Line>
<Line/>
<Line/>
<Line/>
<Line/>
<Line><Dynamic type="text" id="AdjusterName"/></Line>
<Line><Dynamic type="text" id="AdjusterPhone"/></Line>
<Line/>
<Line>Claims Department</Line>
<Line/>
<Line/>
<Line>WB-204 (12-99)</Line>
</Content>
<RequiredData>
<Data fieldtype="NowDate" name="DateField"/>
<Data type="Entry" fieldtype="Text" name="CustomAddress1"
fieldname="CustomAddress1" size="30" maxlength="30"/>
<Data type="Entry" fieldtype="Text" name="CustomAddress2"
fieldname="CustomAddress2" size="30" maxlength="30"/>
<Data type="Entry" fieldtype="Text" name="CustomAddress3"
fieldname="CustomAddress3" size="30" maxlength="30"/>
<Data type="Entry" fieldtype="Text" name="CustomAddress4"
fieldname="CustomAddress4" size="30" maxlength="30"/>
<Data type="Entry" fieldtype="Text" name="YourFile" fieldname="YourFile"
size="30" maxlength="30"/>
<Data type="Entry" fieldtype="Text" name="YourInsured"
fieldname="YourInsured" size="30" maxlength="30"/>
<Data type="Entry" fieldtype="Text" name="OurFile" fieldname="OurFile"
size="30" maxlength="30"/>
<Data type="Entry" fieldtype="Text" name="OurInsured"
fieldname="OurInsured" size="30" maxlength="30"/>
<Data type="Entry" fieldtype="Text" name="DateOfLoss"
fieldname="DateOfLoss" size="30" maxlength="30"/>
<Data type="Entry" fieldtype="Text" name="MedicalPaid"
fieldname="MedicalPaid" size="30" maxlength="20" entrytype="Numeric"/>
<Data type="Entry" fieldtype="Text" name="WageLossPaid"
fieldname="WageLossPaid" size="30" maxlength="20" entrytype="Numeric"/>
<Data type="Entry" fieldtype="Text" name="EssentialServicesPaid"
fieldname="EssentialServicesPaid" size="30" maxlength="20"
entrytype="Numeric"/>
<Data type="Entry" fieldtype="Checkbox" name="AdviseThresholdYes"
fieldname="AdviseThresholdYes"/>
<Data type="Entry" fieldtype="Checkbox" name="AdviseThresholdNo"
fieldname="AdviseThresholdNo"/>
<Data type="Entry" fieldtype="Checkbox" name="ConductedIMEYes"
fieldname="ConductedIMEYes"/>
<Data type="Entry" fieldtype="Checkbox" name="ConductedIMENo"
fieldname="ConductedIMENo"/>
<Data type="Entry" fieldtype="Checkbox" name="ContemplateSchedulingYes"
fieldname="ContemplateSchedulingYes"/>
<Data type="Entry" fieldtype="Checkbox" name="ContemplateSchedulingNo"
fieldname="ContemplateSchedulingNo"/>
<Data type="Entry" fieldtype="Text" name="NatureOfInjury"
fieldname="NatureOfInjury" size="30" maxlength="30"/>
<Data type="Merge" fieldtype="Text" name="AdjusterName"
fieldname="AdjusterName" size="30" maxlength="30"/>
<Data type="Merge" fieldtype="Text" name="AdjusterPhone"
fieldname="AdjusterPhone" size="30" maxlength="30"/>
</RequiredData>
</Form>
Any help would be greatly appreciated.
--
Joe
VB.NET/C#/ASP.NET/ASP/VB/C++/Web and DB development/VBA Automation
这篇关于在文字文本中呈现服务器控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!