1. Content = Replace(Content,vbcrlf,"<br>") 文本框替换回车用C#怎么写?
2. 怎么才可以用C#实现下面的代码,在Vs里面的,也就是页面吧.
<%
if Request.Cookies("test")<>"" then
%>
<table>
内容
</table>
<%
else
%>
<table>
不同的内容
</table>
<%
end if
%>
Content.Replace("\r\n","<br>")
<%if(Request.Cookies["test"] != null) {%>
....
<%} else {%>
.....
<%}%>
1:
TextBox1.Text.Replace("\n","<br/>")
TextBox1.Text.Replace(Chr(13), "<br/>")
1. str=str.Replace("\r\n","")
2. 用Panel就可以。
js的话用table的style
<table id="tab1">
<table id="tab2">
<script>
if(str==undefined||nike==)
{
tab1.style.display="none";
tab2.style.display="block";
}</script>
2:
在.cs文件里:
if(Request.Cookies("test") != "")
{
str1 = "内容";
}
else
{
str1 = "不同的内容";
}
DataBind();
在.aspx文件中
<table>
<%= str1 %>
</table>