如何添加目标使用的HtmlTextWriter。我需要target ='_ blank'。有人会帮助我。
有代码:
Dim sw As StringWriter = New StringWriter()
Using ht As HtmlTextWriter = New HtmlTextWriter(sw)
ht.RenderBeginTag(HtmlTextWriterTag.A)
ht.AddAttribute(HtmlTextWriterAttribute.Href, "Order" & "/" & "FileName")
ht.Write("Order1")
ht.RenderEndTag()
End Using
答案 0 :(得分:0)
我需要这段代码,ht.AddAttribute(HtmlTextWriterAttribute.Target,“_ blank”)