[重新发布] OnMouseOver在框架中渲染文本 [英] [Repost] OnMouseOver Rendering text in frame

查看:56
本文介绍了[重新发布] OnMouseOver在框架中渲染文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我要在与另一个框架中的网格分开的框架中呈现文本.当光标经过单元格时,必须渲染文本,而当我移出单元格时,文本必须消失.我得到了数据,但是奇怪的是,尽管有数据,但如果两个单词之间有空格,则不会出现文本. 我在转发器中检索数据,并使用Repeater_ItemDataBound操作它们. 代码:

Suppose I want to render text in a frame separated from a grid in another frame. When the cursor passes over a cell the text must be rendered and when I move out the text must disappear. I get the data but strangely if there''s a space between two words, the text will not appear, although the data are there. I retrieve the data in a repeater and I manipulate them with Repeater_ItemDataBound. Code:

Sub Repeater_ItemDataBound(ByVal s As Object, ByVal e As RepeaterItemEventArgs)

//here I retrieve the data
Dim reader As SqlDataReader = cm.ExecuteReader()

While reader.Read()
    'Response.Write(reader("DSOmschrijving"))
    If reader("DSOmschrijving") <> "" Then
        var1 = 1
        var2 = reader("DSOmschrijving").ToString
    End If
End While
'Test to render them
'response.write(var2) ---> and indeed the text is rendered on the screen(principal frame).

'Here the text must be in frame2
If var1 = 1 Then
    LabDSCode.Text = "<td bgcolor='#999999'>" & "<a href='details.aspx?ds=" & dataLLDCode & _
"&didsug=" & var2 & "' onMouseOver=parent.frames[1].document.open();parent.frames[1].document.write('" & var2 & _
"');parent.frames[1].document.close();>".ToString & "&nbsp&nbsp&nbsp&nbsp&nbsp" & "</a>"
Else

End If
cn.Close()
reader.Close()

如果删除所有空格(& nbsp),则可以,但不能. 有谁知道解决方案吗? 非常感谢

If I delete all the spaces (&nbsp) it works , but otherwise not. Is there someone who knows a solution? Thanks a lot

推荐答案

您已经问过三遍了.您之前已经得到了答复.如果您有任何新信息(但对我来说看起来也一样),则可以编辑您的帖子,以免给我们带来一遍又一遍地为您提供相同答案(显然是您无法理解的答案)的麻烦.  如果您有任何要添加的内容,请修改原始帖子,该帖子会受到影响.

You have asked this three times now.  You''ve been answered before.  The non rude thing to do would be to edit your post if you have any new info ( but it looks the same to me ) to save us all the bother of giving you the same answers, which you apparently cannot understand, over and over.  If you have anything to add, edit your original post and it will be bumped.


这篇关于[重新发布] OnMouseOver在框架中渲染文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆