我有一个ListBox,选择模式为multiple.在后面的代码中,我想将一些值设置为选中.这些值存在于名为"Names"的ListItems []中.
HTML代码:
<asp:ListBox ID="lbto" class="chosen" runat="server" Width="450px"
Height="20px" SelectionMode="Multiple">
<asp:ListItem>Mandy</asp:ListItem>
<asp:ListItem>Amit</asp:ListItem>
<asp:ListItem>sundar</asp:ListItem>
<asp:ListItem>ragu</asp:ListItem>
<asp:ListItem>raju</asp:ListItem>
</asp:ListBox>
Run Code Online (Sandbox Code Playgroud)
列表项[]的名称中包含"肉酱"和"拉朱".现在,页面加载时,在列表框应该包含"肉酱"和"拉朱"作为选择的值.
我有一个字符串str="<u>rag</u>".现在,我只想获得字符串"rag".如何使用正则表达式获取它?
我的代码在这里..
我得到了输出=""
提前致谢..
C#代码:
string input="<u>ragu</u>";
string regex = "(\\<.*\\>)";
string output = Regex.Replace(input, regex, "");
Run Code Online (Sandbox Code Playgroud) 我有两个数据表如下所示
表格1
-------------------------
ID | Name
--------------------------
1 | JOHN
2 | GEORGE
3 | RAGU
--------------------------
Run Code Online (Sandbox Code Playgroud)
表2
----------
ID | AGE
----------
1 | 23
2 | 23
3 | 22
----------
Run Code Online (Sandbox Code Playgroud)
我只想得到这样的结果..
结果
-------------------------
ID | Name | AGE
--------------------------
1 | JOHN | 23
2 | GEORGE | 23
3 | RAGU | 22
--------------------------
Run Code Online (Sandbox Code Playgroud)
谢谢..