请问这个绑定超链接怎么错了?在线等 String str;String url= "company_user_c_website";//不包含http://if(-1==url.indexOf("http://")){ str = "http://"+url;}else{str=url;}网址:<a href="<%=url%>" target="_blank"><%=company_user_c_website%></a> 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <a href="<%=url%>"中间修改成str 才对的吧 public string str;public string url= "http://www.baidu.com";//不包含http://if(-1==url.indexOf("http://")){ str = "http://"+url;}else{ str=url;}网址:<a href="<%=url%>" target="_blank"><%=str%></a> 要注意后台的变量要是public的 public string str;public string url= "http://www.baidu.com";public void Page_Load(object sender,EventArgs e){ if(!IsPostBack) { //不包含http:// if(-1==url.indexOf("http://")) { str = "http://"+url; } else { str=url; } }}网址:<a href='<%=url%>' target="_blank"><%=str%></a> 因为这个URL是变量 现在好像是定义出错了public string url= "http://www.baidu.com";publicString url= "company_user_c_website";这个company_user_c_website 是用SqlDataReader = DB.RunProcGetReader 读出来的 SqlDataReader dt = DB.RunProcGetReader("caozuo 1,'[com_job_view]', 'top 1 company_user_c_website',' company_job_info_id=''" + Request("company_job_info_id") + "''',''");while (dt.Read()) { str() = dt(0).ToString();}//不包含http://if (-1 == str().IndexOf("http://")) { url = "http://" + str();} else { url = str();}网址:<a href="<%=url%>" target="_blank"><%=str%></a> str();str() = dt(0).ToString();没出错???str = dt(0).ToString(); SqlDataReader dt = DB.RunProcGetReader("caozuo 1,'[com_job_view]', 'top 1 company_user_c_website',' company_job_info_id=''" + Request("company_job_info_id") + "''',''");while (dt.Read()) { str = dt(0).ToString();}//不包含http://if (-1 == str().IndexOf("http://")) { url = "http://" + str();} else { url = str();} C# TreeView 的事件 急!!!!!! 如何用条码字体生成条码? 请教:Application.Exit();与窗体的关闭按钮的作用的区别 字符串分割问题。 Socket接收数据经常出错! 如何动态获得一个城市的经纬度 用textBox控件时怎样来确定里面的内容是数字呢? WebService调用IPCClientChannel的问题 在接收到的信息中如何去除多余的空字节 如何准确快速定位鼠标位置? 急!!!改写的一个把选择图片分成9块(随即分开的),帮忙调下,老错 用VS做的程序是不是必须在.net framework框架下运行?
中间修改成str 才对的吧
public string str;
public string url= "http://www.baidu.com";
//不包含http://
if(-1==url.indexOf("http://"))
{
str = "http://"+url;
}
else
{
str=url;
}网址:<a href="<%=url%>" target="_blank"><%=str%></a>
public string str;
public string url= "http://www.baidu.com";public void Page_Load(object sender,EventArgs e)
{
if(!IsPostBack)
{
//不包含http://
if(-1==url.indexOf("http://"))
{
str = "http://"+url;
}
else
{
str=url;
}
}
}网址:<a href='<%=url%>' target="_blank"><%=str%></a>
因为这个URL是变量
现在好像是定义出错了
public string url= "http://www.baidu.com";publicString url= "company_user_c_website";这个company_user_c_website 是用SqlDataReader = DB.RunProcGetReader 读出来的
SqlDataReader dt = DB.RunProcGetReader("caozuo 1,'[com_job_view]', 'top 1 company_user_c_website',' company_job_info_id=''" + Request("company_job_info_id") + "''',''");
while (dt.Read()) {
str() = dt(0).ToString();
}//不包含http://
if (-1 == str().IndexOf("http://")) {
url = "http://" + str();} else {
url = str();
}
网址:<a href="<%=url%>" target="_blank"><%=str%></a>
str() = dt(0).ToString();没出错???
str = dt(0).ToString();
SqlDataReader dt = DB.RunProcGetReader("caozuo 1,'[com_job_view]', 'top 1 company_user_c_website',' company_job_info_id=''" + Request("company_job_info_id") + "''',''");
while (dt.Read()) {
str = dt(0).ToString();
}//不包含http://
if (-1 == str().IndexOf("http://")) {
url = "http://" + str();} else {
url = str();
}