在asp.net C#中定位response.write的输出 [英] positioning the output of response.write in asp.net C#
问题描述
我正在尝试通过使用response.write将输出提交到我的aspx页面,因为我正在使用以下代码:
i am trying to postion the output to my aspx page by using response.write for that i am using this code:
Response.Write("<<span id='Label1'' style='height:16px;width:120px;Z-INDEX: 102; LEFT: 288px; POSITION: absolute; TOP: 144px'>Its not at the top left corner!</span>");
这会在屏幕中间显示我的消息,但还会显示<"在左上角.我已经尝试了一些方法,但是我无法摆脱它.
this prints my message in the middle of the screen but also shows a "<" at the left corner. I have tried a few things but i am unable to get rid of it.
请帮助
还有其他定位输出的方式吗?
any other way of positioning the output?
推荐答案
尝试:
Response.Write("<span id='Label1' style='height:16px;width:120px;Z-INDEX: 102; LEFT: 288px; POSITION: absolute; TOP: 144px'>Its not at the top left corner!</span>");
您有一个& lt;刚开始时,它会给您<",并在Label1之后加一个双''
You had a < at the beginning, which is giving you the "<" , and a double '' after Label1
但是有很多更好的方法可以使用CSS定位和使用Response生成输出.通常不需要直接写...您打算做什么?
But there are LOTS of better ways of positioning with CSS and producing output with Response.Write directly is generally not needed... What are you trying to do?
这篇关于在asp.net C#中定位response.write的输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!