问答文章1 问答文章501 问答文章1001 问答文章1501 问答文章2001 问答文章2501 问答文章3001 问答文章3501 问答文章4001 问答文章4501 问答文章5001 问答文章5501 问答文章6001 问答文章6501 问答文章7001 问答文章7501 问答文章8001 问答文章8501 问答文章9001 问答文章9501

asp.net怎样从后台将hr标签显示到页面

发布网友 发布时间:2023-09-30 12:16

我来回答

2个回答

热心网友 时间:2024-12-04 15:36

实现那个效果可以使用VS工具提供的
<asp:MultiView ID="MultiView1" runat="server" />
服务器控件来实现。
它具体的使用情况请看下面:
这是它的属性情况:
<asp:MultiView
ActiveViewIndex="integer"
EnableTheming="True|False"
EnableViewState="True|False"
ID="string"
OnActiveViewChanged="ActiveViewChanged event handler"
OnDataBinding="DataBinding event handler"
OnDisposed="Disposed event handler"
OnInit="Init event handler"
OnLoad="Load event handler"
OnPreRender="PreRender event handler"
OnUnload="Unload event handler"
runat="server"
SkinID="string"
Visible="True|False"
>
<asp:TemplatedWizardStep
AllowReturn="True|False"
ContentTemplateContainer="string"
EnableTheming="True|False"
EnableViewState="True|False"
ID="string"
OnActivate="Activate event handler"
OnDataBinding="DataBinding event handler"
OnDeactivate="Deactivate event handler"
OnDisposed="Disposed event handler"
OnInit="Init event handler"
OnLoad="Load event handler"
OnPreRender="PreRender event handler"
OnUnload="Unload event handler"
runat="server"
SkinID="string"
StepType="Auto|Complete|Finish|Start|Step"
Title="string"
Visible="True|False"
>
<ContentTemplate>
<!-- child controls -->
</ContentTemplate>
<CustomNavigationTemplate>
<!-- child controls -->
</CustomNavigationTemplate>
</asp:TemplatedWizardStep>
<asp:View
EnableTheming="True|False"
EnableViewState="True|False"
ID="string"
OnActivate="Activate event handler"
OnDataBinding="DataBinding event handler"
OnDeactivate="Deactivate event handler"
OnDisposed="Disposed event handler"
OnInit="Init event handler"
OnLoad="Load event handler"
OnPreRender="PreRender event handler"
OnUnload="Unload event handler"
runat="server"
SkinID="string"
Visible="True|False"
/>
<asp:WizardStep
AllowReturn="True|False"
EnableTheming="True|False"
EnableViewState="True|False"
ID="string"
OnActivate="Activate event handler"
OnDataBinding="DataBinding event handler"
OnDeactivate="Deactivate event handler"
OnDisposed="Disposed event handler"
OnInit="Init event handler"
OnLoad="Load event handler"
OnPreRender="PreRender event handler"
OnUnload="Unload event handler"
runat="server"
SkinID="string"
StepType="Auto|Complete|Finish|Start|Step"
Title="string"
Visible="True|False"
/>
</asp:MultiView>
下面是例子
<%@ Page Language="C#" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"">
<html xmlns="" >
<head>
<title>MultiView ActiveViewIndex Example</title>
<script runat="server">

protected void NextButton_Command(object sender, EventArgs e)
{
// Determine which button was clicked
// and set the ActiveViewIndex property to
// the view selected by the user.
if (DevPollMultiView.ActiveViewIndex > -1 & DevPollMultiView.ActiveViewIndex < 3)
{
// Increment the ActiveViewIndex property
// by one to advance to the next view.
DevPollMultiView.ActiveViewIndex += 1;
}
else if (DevPollMultiView.ActiveViewIndex == 3)
{
// This is the final view.
// The user wants to save the survey results.
// Insert code here to save survey results.
// Disable the navigation buttons.
Page4Save.Enabled = false;
Page4Restart.Enabled = false;
}
else
{
throw new Exception("An error occurred.");
}
}

protected void BackButton_Command(object sender, EventArgs e)
{
if (DevPollMultiView.ActiveViewIndex > 0 & DevPollMultiView.ActiveViewIndex <= 2)
{
// Decrement the ActiveViewIndex property
// by one to return to the previous view.
DevPollMultiView.ActiveViewIndex -= 1;
}
else if (DevPollMultiView.ActiveViewIndex == 3)
{
// This is the final view.
// The user wants to restart the survey.
// Return to the first view.
DevPollMultiView.ActiveViewIndex = 0;
}
else
{
throw new Exception("An error occurred.");
}
}

</script>

</head>
<body>
<form id="Form1" runat="Server">

<h3>MultiView ActiveViewIndex Example</h3>

<asp:Panel id="Page1ViewPanel"
Width="330px"
Height="150px"
HorizontalAlign="Left"
Font-size="12"
BackColor="#C0C0FF"
BorderColor="#404040"
BorderStyle="Double"
runat="Server">

<asp:MultiView id="DevPollMultiView"
ActiveViewIndex="0"
runat="Server">

<asp:View id="Page1"
runat="Server">

<asp:Label id="Page1Label"
Font-bold="true"
Text="What kind of applications do you develop?"
runat="Server"
AssociatedControlID="Page1">
</asp:Label><br /><br />

<asp:RadioButton id="Page1Radio1"
Text="Web Applications"
Checked="False"
GroupName="RadioGroup1"
runat="server" >
</asp:RadioButton><br />

<asp:RadioButton id="Page1Radio2"
Text="Windows Forms Applications"
Checked="False"
GroupName="RadioGroup1"
runat="server" >
</asp:RadioButton><br /><br /><br />

<asp:Button id="Page1Next"
Text = "Next"
OnClick="NextButton_Command"
Height="25"
Width="70"
runat= "Server">
</asp:Button>

</asp:View>

<asp:View id="Page2"
runat="Server">

<asp:Label id="Page2Label"
Font-bold="true"
Text="How long have you been a developer?"
runat="Server"
AssociatedControlID="Page2">
</asp:Label><br /><br />

<asp:RadioButton id="Page2Radio1"
Text="Less than five years"
Checked="False"
GroupName="RadioGroup1"
runat="Server">
</asp:RadioButton><br />

<asp:RadioButton id="Page2Radio2"
Text="More than five years"
Checked="False"
GroupName="RadioGroup1"
runat="Server">
</asp:RadioButton><br /><br /><br />

<asp:Button id="Page2Back"
Text = "Previous"
OnClick="BackButton_Command"
Height="25"
Width="70"
runat= "Server">
</asp:Button>

<asp:Button id="Page2Next"
Text = "Next"
OnClick="NextButton_Command"
Height="25"
Width="70"
runat="Server">
</asp:Button>

</asp:View>

<asp:View id="Page3"
runat="Server">

<asp:Label id="Page3Label1"
Font-bold="true"
Text= "What is your primary programming language?"
runat="Server"
AssociatedControlID="Page3">
</asp:Label><br /><br />

<asp:RadioButton id="Page3Radio1"
Text="Visual Basic .NET"
Checked="False"
GroupName="RadioGroup1"
runat="Server">
</asp:RadioButton><br />

<asp:RadioButton id="Page3Radio2"
Text="C#"
Checked="False"
GroupName="RadioGroup1"
runat="Server">
</asp:RadioButton><br />

<asp:RadioButton id="Page3Radio3"
Text="C++"
Checked="False"
GroupName="RadioGroup1"
runat="Server">
</asp:RadioButton><br /><br />

<asp:Button id="Page3Back"
Text = "Previous"
OnClick="BackButton_Command"
Height="25"
Width="70"
runat="Server">
</asp:Button>

<asp:Button id="Page3Next"
Text = "Next"
OnClick="NextButton_Command"
Height="25"
Width="70"
runat="Server">
</asp:Button><br />

</asp:View>

<asp:View id="Page4"
runat="Server">

<asp:Label id="Label1"
Font-bold="true"
Text = "Thank you for taking the survey."
runat="Server"
AssociatedControlID="Page4">
</asp:Label>

<br /><br /><br /><br /><br /><br />

<asp:Button id="Page4Save"
Text = "Save Responses"
OnClick="NextButton_Command"
Height="25"
Width="110"
runat="Server">
</asp:Button>

<asp:Button id="Page4Restart"
Text = "Retake Survey"
OnClick="BackButton_Command"
Height="25"
Width="110"
runat= "Server">
</asp:Button>

</asp:View>

</asp:MultiView>

</asp:Panel>

</form>
</body>
</html>

热心网友 时间:2024-12-04 15:36

Response.Write("<hr />");
声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com
女人梦见蛇的七大预兆解梦 PHOTOSHOP 怎么把眼睛点大 这些月销量10000+的防晒霜,是噱头还是真的好用? 大宝水凝保湿防晒露适合哪些肤质的人使用? 拥有人口过亿的国家最多的大洲是( )A.非洲B.亚洲C.欧洲D.大洋 世界国家最多的大洲是:( ) A.亚洲 B.大洋州 C.非洲 D.欧 拥有人口过亿的国家最多的大洲是:( ) A.非洲 B.亚洲 C.欧洲 D.大洋 餐厅一般中餐都有哪些摆台要求和标准 如何做味道正宗的中餐? 河南文科跟理科高考分数线相差多少 (ASP.NET)如何让wizard控件留在当前step? 3次魔族奇遇还有魔劲吗 aoa 怦然心动 中文版什么时候出 《光与夜之恋》异色收益情况一览 梦见女朋友在路上生了男孩的预兆 一首英文歌开头是铃铃铃铃铃的声音 求东方神起起床铃声?短信铃? 请问电视剧《仙剑奇侠传》里的道具 ”莫失莫忘铃“有卖的吗?如果有请... 0置名03联想音铃E内列求字表 函数f(x)=asin(wx-∏/6)的最大值为3,企图想相铃两条对称轴之间的距离为... 山东锐铃汽车有限公司怎么样? 关于讲杀生丸和铃的有哪几集? 有没有好听的手机铃声,我实在是找不到了,大家帮忙介绍几个人_百度知... 王铃的经典歌曲都有哪些,求资源 铃羊1.3可装0bd行车电脑吗 高考结束后铃也响了但是我涂了一下卡会被监控记0分吗,今年特别严高清回 ... 什么叫劳铃 手机上网 炫铃 五征奥180 0解放霸铃唐骏欧铃3380福田3360哪个性价比高 小女神花ling、到底是【铃】还是【玲】、 问一问 快来月经吃避孕药有没有什么副作用 事事必求读以致用,结果常为读以致庸?什么意思? 一汽大众宝来到底能不能买?听听十年老司机怎么说 我今天去一汽大众4S店问了一下,店员告我宝来红色的不是金属漆,请问... 保护板、锂电池上用的连接线属于哪个税收编码 自己安装车载导航显示器,挂1挡和倒车都不能走了,是什么原因 电脑怎么登录两个? 怎么在电脑上面登录两个啊 新泰华府新天地在什么位置? 佛山普君新城华府二期有多少户? 绑定后支付的时候显示银行系统显示你无法开通业务是怎么回事? 商丘到许昌市、驻马店、信阳市最经济距离怎么走 女友和我分手了,心情低谷,该怎么办? 和女友分手后很不甘心,我该怎么办? 小米3无法升级系统 绑定后支付的时候显示银行系统显示你无法开通业务是怎么回事? cad图导入3d后坐标归零后图形看不到怎么回事‘ 你觉得学习配景对整幅效果图表现有什么意义 救急!怎么在word文档删除行??? 在word文档中,如何将58页的第10行至966页的22行,一次性的快速删除?