62,266
社区成员
发帖
与我相关
我的任务
分享
<a href='#' OnClick=" + "javascript:window.open('http://99.8.124.132/infoview.asp?id=' + sqlRdr.GetValue(0) + '&ts='+tz','width=400,height=400;toolbar=no;');
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
public partial class Controls_callborad : System.Web.UI.UserControl
{
protected void Page_Load(object sender, EventArgs e)
{
string s = "server=local;database=temp;uid=sa;pwd=;";
SqlConnection conn = new SqlConnection(s);
string strSql = "select top 10 tzid,tztitle,tztime from dbo.tzdb order by tzid desc";
string strScrolling = "";
HtmlTableCell cellScrolling = new HtmlTableCell();
SqlCommand myComd = new SqlCommand(strSql, conn);
SqlDataReader sqlRdr;
try
{
conn.Open();
sqlRdr = myComd.ExecuteReader();
strScrolling = "<Marquee OnMouseOver='this.stop();' OnMouseOut='this.start();' direction='up' scrollamount='1' bgcolor='#ECF0EE' width='90%' scrolldelay='50'>";
while (sqlRdr.Read())
{
strScrolling = strScrolling + "<a href='#' OnClick=" + "javascript:window.open('http://99.8.124.132/infoview.asp?id=' + sqlRdr.GetValue(0) + '&ts='+tz','width=400,height=400;toolbar=no;');" + "><font face='verdana' size='2' color='#000000' style='TEXT-DECORATION:none;'>" + sqlRdr.GetValue(1) + "</font></a><br><br>";
}
strScrolling = strScrolling + "</Marquee>";
sqlRdr.Close();
cellScrolling.InnerHtml = strScrolling;
rowScrolling.Cells.Add(cellScrolling);
}
catch (Exception msg)
{
Response.Write(msg.Message);
}
finally
{
conn.Close();
}
<a href='#' OnClick="javascript:window.open('http://99.8.124.132/infoview.asp?id=' + sqlRdr.GetValue(0) + '&ts='+tz','width=400,height=400;toolbar=no;'");