首页
\
问答
\
可以从aspx页面添加控件到WebUserControl吗?(is that possible to add controls into WebUserControl from aspx page?)
可以从aspx页面添加控件到WebUserControl吗?(is that possible to add controls into WebUserControl from aspx page?)
例如我创建的用户控件是停靠面板,我想让它允许从aspx页面添加其他控件。
<uc1:dockPanel ID="dockPanel1" runat="server" > --add control to here from aspx page-- </uc1:dockPanel>
for example the user control i created is a dock panel, and i want to make it to allow add others controls from aspx page.
<uc1:dockPanel ID="dockPanel1" runat="server" > --add control to here from aspx page-- </uc1:dockPanel>
原文:https://stackoverflow.com/questions/17987414
更新时间:2022-12-09 09:12
最满意答案
问题结果是语法,解决方案非常简单。 感谢所有贡献他们意见的人。
你可以在这里看到最终的测试函数(xml):
function testFunction(xml) { var i; var xmlDoc = xml.responseXML; var table="<tr><th>Unit</th><th>Price</th><th>Quantity</th><th>Total Price</th></tr>"; var y = xmlDoc.getElementsByTagName("UNIT"); for (i = 0; i < y.length; i++) { var p = y[i].getElementsByTagName("PRICE")[0].childNodes[0].nodeValue; var q = y[i].getElementsByTagName("QUANTITY")[0].childNodes[0].nodeValue; var n = y[i].getElementsByTagName("NAME")[0].childNodes[0].nodeValue; table += "<tr><td>" + n + "</td><td>" + p + "</td><td>" + q + "</td><td>" + p*q + // This is the total price column. "</td></tr>"; } document.getElementById("test").innerHTML = table; }
The problem turned out to be syntax and the solution is very simple. Thanks to everyone who contributed their input.
You can see the final testfunction(xml) here:
function testFunction(xml) { var i; var xmlDoc = xml.responseXML; var table="<tr><th>Unit</th><th>Price</th><th>Quantity</th><th>Total Price</th></tr>"; var y = xmlDoc.getElementsByTagName("UNIT"); for (i = 0; i < y.length; i++) { var p = y[i].getElementsByTagName("PRICE")[0].childNodes[0].nodeValue; var q = y[i].getElementsByTagName("QUANTITY")[0].childNodes[0].nodeValue; var n = y[i].getElementsByTagName("NAME")[0].childNodes[0].nodeValue; table += "<tr><td>" + n + "</td><td>" + p + "</td><td>" + q + "</td><td>" + p*q + // This is the total price column. "</td></tr>"; } document.getElementById("test").innerHTML = table; }
相关问答
更多-
从不同的表中获取XML(Get XML from different Tables)[2022-10-05]
为扩展问题添加 Select * ,(select cast( isnull((Select * From @t1 for xml raw('FirstTable')),'') +isnull((Select * From @t2 for xml raw('AnotherTable')),'') as xml) ) From @t3 for xml raw('Thir ... -
这将处理现有文件。 这是你的输入文件:
0 True Complicen Comp_11_2_2011 ... -
如何从SQL Server中的表查询Xml值和属性?(How to query for Xml values and attributes from table in SQL Server?)[2022-05-23]
其实你很接近你的目标,你只需要使用nodes()方法来分割你的行,然后获取值: select s.SqmId, m.c.value('@id', 'varchar(max)') as id, m.c.value('@type', 'varchar(max)') as type, m.c.value('@unit', 'varchar(max)') as unit, m.c.value('@sum', 'varchar(max)') as [sum], m.c. ... -
如果您首先将XML文件加载到临时表,那将是一个好主意。 之后,一个简单的查询应该足以从参考表中获取代码。 这样您就可以解决两个问题。 外键和不同的字段名称。 It would be a good idea if you load the XML file to a temporary table first. After that, a simple query should be enough to grab the code from the reference table. This way you ...
-
XML数据到SQL表(XML data to SQL Table)[2022-08-04]
SSIS包可以包含控制流以及一个或多个数据流。 您需要包含XML任务和数据流任务(具有XML源以将数据加载到sql表)。 使用优先约束在控制流中连接这些可执行文件和任务。 该SSIS包将自动化。 将结果从XML任务保存到文件或变量。 在XML任务编辑器中, 将SaveOperationResult设置为True 将OperationResult \ DestinationType设置为文件连接或变量 从Destination属性定义新变量或文件连接或选择现有属性。 在XML Source Editor中,选 ... -
问题结果是语法,解决方案非常简单。 感谢所有贡献他们意见的人。 你可以在这里看到最终的测试函数(xml): function testFunction(xml) { var i; var xmlDoc = xml.responseXML; var table="
"; var y = xmlDoc.getElementsByTagName("UNIT"); for ...Unit Price Quantity Total Price -
您可以轻松地从
节点提取信息并将其插入Asset : ( PS:注意:这是一个处理器 - 不是“处理者”(两个人之后没有) ) DECLARE @Input XML SET @Input = ' CREATE TABLE [dbo].[myTable] ( [a] [int] NULL, [b] [varchar](50) NULL, [c] [datetime] NULL ) ; DECLARE @p_xml XML SET @p_xml = '