我的用户控件如下:<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ReleaseMessage.ascx.cs" Inherits="selfControl_ReleaseMessage" %>
<style type="text/css">
.style1
{
width: 273px;
}
.style2
{
height:10px;
border-bottom:1px dashed gray;
}
a
{
text-decoration:none;
font-family:Arial;
font-size:smaller;
}
a:hover
{
text-decoration:underline;
color:Navy;
cursor:pointer;
}
#close
{
height: 23px;
}
.commet_txt
{
width:550px;
margin-top:10px;
margin-left:auto;
margin-right:auto;
display:none;
}
</style>
<script type="text/javascript">
function ShowZFDiv() {
var ShowZFDiv = document.getElementById("main_ref_container");
ShowZFDiv.style.display = '';
ShowZFDiv.style.left = "30%";
ShowZFDiv.style.top = "30%";
ShowZFDiv.style.zIndex = "2";
}
function closeDiv() {
var closeDiv = document.getElementById("main_ref_container");
closeDiv.style.display = 'none';
}
function showcommetDiv() { var showcommetDiv = document.getElementById("commet_div");
if (showcommetDiv.style.display == 'none')
showcommetDiv.style.display = '';
else
showcommetDiv.style.display = 'none';
}
</script> <div id="self_ctrl_div" style="width:630px;background-color: #F4F4F4">
<table width="630px" >
<tr><td><asp:Image ID="img_header" runat="server" Height="60px"
Width="60px" ToolTip="头像"/></td>
<td class="style1">
<asp:Label ID="lbl_name" runat="server" Text="Label"></asp:Label>
<asp:Label ID="lbl_user_id" runat="server" Text="Label"></asp:Label>
<asp:Label ID="lbl_author_id" runat="server" Text="Label"></asp:Label>
<asp:Label ID="lbl_amsgid" runat="server" Text="Label"></asp:Label>
<asp:Label ID="lbl_authorname" runat="server" Text="Label"></asp:Label>
</td>
<td></td>
<td></td>
<td style="width:120px"><asp:Label ID="lbl_fabutime" runat="server" Text="显示发布日期"></asp:Label>
</td></tr>
<tr><td rowspan="2"></td><td colspan="3">
<asp:Label ID="lbl_content" runat="server"></asp:Label>
</td><td rowspan="2"></td></tr>
<tr><td colspan="3">
<asp:Image ID="img_showpic" runat="server" Height="150px" Visible="False" />
</td></tr>
<tr><td></td><td class="style1"></td><td>
<a id="a_zhuangfa" onclick="ShowZFDiv()">转发</a>
</td><td>
<a id="a_pinglun" onclick="showcommetDiv()">评论</a>
</td><td>
<a id="a_more" onclick="">更多</a>
</td></tr>
<tr><td class="style2" colspan="5"> </td></tr>
</table>
<div id="commet_div" style="width:550px;margin-top:10px;margin-left:auto; margin-right:auto;display:none;">
<div id="commet_txt">
<asp:TextBox ID="TextBox2" runat="server" Rows="2" TextMode="MultiLine" Width="550px"></asp:TextBox><br />
<span style="float:right; margin-top:10px"><button id="btn_submit_commet" value="评论">评论</button></span>
</div>
<div id="commet_list">
<a href="#" id="userphoto"><img src="" alt="" width="30px" height="30px" /></a>
<a href="#" id="username">用户名</a>:<label id="commet_content" title="评论内容">评论内容</label>
<span id="respone_commet" style="display:block; float:right; margin:5px"><a onclick="">回 复</a></span>
</div>
</div>
</div><div id="main_ref_container" style=" width:400px; height:264px;position:fixed;display:none;background-color:#309fca; border:1px solid blue">
<div id="close">
<a style=" background-position: 0px 0px; float:right;
display:block; width: 35px; height: 19px; margin-top:5px; margin-right:5px; background-image: url('../image/close.jpg'); background-repeat: no-repeat; background-attachment: scroll;"
onclick="closeDiv()">关闭</a>
<label for="topicForwardType_84043" style="CURSOR: pointer"></label>
<h2>转发微博</h2></div>
<div id="ref_content" style=" width:90%; margin-left:auto; margin-right:auto">
转发理由.....<br />
<asp:TextBox ID="TextBox1" runat="server" TextMode="MultiLine" Height="163px"
Width="359px"></asp:TextBox>
</div><br />
<div id="ref_button" style=" width:90%; margin-left:auto; margin-right:auto">
<div style="width:80%; float:right">
<asp:CheckBox ID="CheckBox1" runat="server" Text="同时作为评论发布" />
<asp:ImageButton ID="btn_zhuanfa" runat="server" ImageUrl="~/image/btn_ref.jpg"
Width="80px" onclick="btn_zhuanfa_Click" />
</div>
</div>
</div>aspx页面引用如下:
<uc1:ReleaseMessage ID="ReleaseMessage1" runat="server" />
<uc1:ReleaseMessage ID="ReleaseMessage2" runat="server" />
<uc1:ReleaseMessage ID="ReleaseMessage3" runat="server" />当点击评论链接是每次都是第一个用户控件弹出评论框 这是怎么回事 希望高手指点 多谢!
<style type="text/css">
.style1
{
width: 273px;
}
.style2
{
height:10px;
border-bottom:1px dashed gray;
}
a
{
text-decoration:none;
font-family:Arial;
font-size:smaller;
}
a:hover
{
text-decoration:underline;
color:Navy;
cursor:pointer;
}
#close
{
height: 23px;
}
.commet_txt
{
width:550px;
margin-top:10px;
margin-left:auto;
margin-right:auto;
display:none;
}
</style>
<script type="text/javascript">
function ShowZFDiv() {
var ShowZFDiv = document.getElementById("main_ref_container");
ShowZFDiv.style.display = '';
ShowZFDiv.style.left = "30%";
ShowZFDiv.style.top = "30%";
ShowZFDiv.style.zIndex = "2";
}
function closeDiv() {
var closeDiv = document.getElementById("main_ref_container");
closeDiv.style.display = 'none';
}
function showcommetDiv() { var showcommetDiv = document.getElementById("commet_div");
if (showcommetDiv.style.display == 'none')
showcommetDiv.style.display = '';
else
showcommetDiv.style.display = 'none';
}
</script> <div id="self_ctrl_div" style="width:630px;background-color: #F4F4F4">
<table width="630px" >
<tr><td><asp:Image ID="img_header" runat="server" Height="60px"
Width="60px" ToolTip="头像"/></td>
<td class="style1">
<asp:Label ID="lbl_name" runat="server" Text="Label"></asp:Label>
<asp:Label ID="lbl_user_id" runat="server" Text="Label"></asp:Label>
<asp:Label ID="lbl_author_id" runat="server" Text="Label"></asp:Label>
<asp:Label ID="lbl_amsgid" runat="server" Text="Label"></asp:Label>
<asp:Label ID="lbl_authorname" runat="server" Text="Label"></asp:Label>
</td>
<td></td>
<td></td>
<td style="width:120px"><asp:Label ID="lbl_fabutime" runat="server" Text="显示发布日期"></asp:Label>
</td></tr>
<tr><td rowspan="2"></td><td colspan="3">
<asp:Label ID="lbl_content" runat="server"></asp:Label>
</td><td rowspan="2"></td></tr>
<tr><td colspan="3">
<asp:Image ID="img_showpic" runat="server" Height="150px" Visible="False" />
</td></tr>
<tr><td></td><td class="style1"></td><td>
<a id="a_zhuangfa" onclick="ShowZFDiv()">转发</a>
</td><td>
<a id="a_pinglun" onclick="showcommetDiv()">评论</a>
</td><td>
<a id="a_more" onclick="">更多</a>
</td></tr>
<tr><td class="style2" colspan="5"> </td></tr>
</table>
<div id="commet_div" style="width:550px;margin-top:10px;margin-left:auto; margin-right:auto;display:none;">
<div id="commet_txt">
<asp:TextBox ID="TextBox2" runat="server" Rows="2" TextMode="MultiLine" Width="550px"></asp:TextBox><br />
<span style="float:right; margin-top:10px"><button id="btn_submit_commet" value="评论">评论</button></span>
</div>
<div id="commet_list">
<a href="#" id="userphoto"><img src="" alt="" width="30px" height="30px" /></a>
<a href="#" id="username">用户名</a>:<label id="commet_content" title="评论内容">评论内容</label>
<span id="respone_commet" style="display:block; float:right; margin:5px"><a onclick="">回 复</a></span>
</div>
</div>
</div><div id="main_ref_container" style=" width:400px; height:264px;position:fixed;display:none;background-color:#309fca; border:1px solid blue">
<div id="close">
<a style=" background-position: 0px 0px; float:right;
display:block; width: 35px; height: 19px; margin-top:5px; margin-right:5px; background-image: url('../image/close.jpg'); background-repeat: no-repeat; background-attachment: scroll;"
onclick="closeDiv()">关闭</a>
<label for="topicForwardType_84043" style="CURSOR: pointer"></label>
<h2>转发微博</h2></div>
<div id="ref_content" style=" width:90%; margin-left:auto; margin-right:auto">
转发理由.....<br />
<asp:TextBox ID="TextBox1" runat="server" TextMode="MultiLine" Height="163px"
Width="359px"></asp:TextBox>
</div><br />
<div id="ref_button" style=" width:90%; margin-left:auto; margin-right:auto">
<div style="width:80%; float:right">
<asp:CheckBox ID="CheckBox1" runat="server" Text="同时作为评论发布" />
<asp:ImageButton ID="btn_zhuanfa" runat="server" ImageUrl="~/image/btn_ref.jpg"
Width="80px" onclick="btn_zhuanfa_Click" />
</div>
</div>
</div>aspx页面引用如下:
<uc1:ReleaseMessage ID="ReleaseMessage1" runat="server" />
<uc1:ReleaseMessage ID="ReleaseMessage2" runat="server" />
<uc1:ReleaseMessage ID="ReleaseMessage3" runat="server" />当点击评论链接是每次都是第一个用户控件弹出评论框 这是怎么回事 希望高手指点 多谢!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货