Lấy tên:
=RIGHT(B5,LEN(B5)-FIND(“*”,SUBSTITUTE(B5,” “,”*”,LEN(B5)-LEN(SUBSTITUTE(B5,” “,””)))))
Lấy họ lót:
=LEFT(B5,(LEN(B5)-LEN(C5)))
Lấy tên:
=RIGHT(B5,LEN(B5)-FIND(“*”,SUBSTITUTE(B5,” “,”*”,LEN(B5)-LEN(SUBSTITUTE(B5,” “,””)))))
Lấy họ lót:
=LEFT(B5,(LEN(B5)-LEN(C5)))
public static string StripHtml(string html, bool allowHarmlessTags)
{
if (html == null || html == string.Empty)
return string.Empty;if (allowHarmlessTags)
return System.Text.RegularExpressions.Regex.Replace(html, “”, string.Empty);return System.Text.RegularExpressions.Regex.Replace(html, “<[^>]*>”, string.Empty);
}You want to remove HTML tags from your string.
1234string
html =
"remover <b>html</b> tages "
+
"from <i>string</i> asp.net c#"
;
string
newString = Regex.Replace(html ,
"<.*?>"
,
string
.Empty);
in gridview or datalist bind
?
1<%# Regex.Replace(Eval(
"ItemDetail"
).ToString(),
"<.*?>"
,
string
.Empty)%>