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

2024-12-29 14:27:24
推荐回答(2个)
回答1:

实现那个效果可以使用VS工具提供的

服务器控件来实现。
它具体的使用情况请看下面:
这是它的属性情况:
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"
>
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"
>







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"
/>
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"
/>

下面是例子
<%@ Page Language="C#" %>

"">


MultiView ActiveViewIndex Example






MultiView ActiveViewIndex Example



Width="330px"
Height="150px"
HorizontalAlign="Left"
Font-size="12"
BackColor="#C0C0FF"
BorderColor="#404040"
BorderStyle="Double"
runat="Server">

ActiveViewIndex="0"
runat="Server">

runat="Server">

Font-bold="true"
Text="What kind of applications do you develop?"
runat="Server"
AssociatedControlID="Page1">




Text="Web Applications"
Checked="False"
GroupName="RadioGroup1"
runat="server" >



Text="Windows Forms Applications"
Checked="False"
GroupName="RadioGroup1"
runat="server" >





Text = "Next"
OnClick="NextButton_Command"
Height="25"
Width="70"
runat= "Server">




runat="Server">

Font-bold="true"
Text="How long have you been a developer?"
runat="Server"
AssociatedControlID="Page2">




Text="Less than five years"
Checked="False"
GroupName="RadioGroup1"
runat="Server">



Text="More than five years"
Checked="False"
GroupName="RadioGroup1"
runat="Server">





Text = "Previous"
OnClick="BackButton_Command"
Height="25"
Width="70"
runat= "Server">


Text = "Next"
OnClick="NextButton_Command"
Height="25"
Width="70"
runat="Server">




runat="Server">

Font-bold="true"
Text= "What is your primary programming language?"
runat="Server"
AssociatedControlID="Page3">




Text="Visual Basic .NET"
Checked="False"
GroupName="RadioGroup1"
runat="Server">



Text="C#"
Checked="False"
GroupName="RadioGroup1"
runat="Server">



Text="C++"
Checked="False"
GroupName="RadioGroup1"
runat="Server">




Text = "Previous"
OnClick="BackButton_Command"
Height="25"
Width="70"
runat="Server">


Text = "Next"
OnClick="NextButton_Command"
Height="25"
Width="70"
runat="Server">





runat="Server">

Font-bold="true"
Text = "Thank you for taking the survey."
runat="Server"
AssociatedControlID="Page4">










Text = "Save Responses"
OnClick="NextButton_Command"
Height="25"
Width="110"
runat="Server">


Text = "Retake Survey"
OnClick="BackButton_Command"
Height="25"
Width="110"
runat= "Server">










回答2:

Response.Write("


");