Repeater, datalist, and other hyperlink issues

Source: Internet
Author: User

During my graduation project, I suddenly found a tricky problem, that is, when I used vs for debugging, the path was correct, but when I got to another server, I put it on IIS, And the depressing moment came to me... the path is incorrect!

After checking the information for two days, I finally got... =!

Example: (Custom User Control)

<% @ Control Language = "VB" autoeventwireup = "false" codebehind = "zhaobiaozhongbiaomessage. ascx. VB"
Inherits = ". zhaobiaozhongbiaomessage" %>
<Asp: repeater id = "repeater1" runat = "server" performanceid = "objectperformance1">
<Headertemplate>
<Ul>
</Headertemplate>
<Itemtemplate>
<Li>
<Asp: hyperlink id = "hyperlink1" runat = "server" navigateurl = '<% # databinder. eval (container. dataitem, "zbsn ","~ /Zhaobiao/lookzhaobiao. aspx? Zbsn = {0: g} & type = 2 ") %> 'tooltip = '<% # eval (" zbtitle ") %> '> <% # STR (eval ("zbtitle"), 13) %> </ASP: hyperlink>
</LI>
</Itemtemplate>
<Footertemplate>
<Li> <a id = "A1" href = "~ /Zhaobiao/zhaobiaoindex. aspx "style =" text-Decoration: none "runat =" server "> more... </a> </LI>
</Ul>
</Footertemplate>
</ASP: repeater>
<Asp: objectdatasource id = "objectperformance1" runat = "server" selectmethod = "getzhaobiao6"
Typename = "com. hqnetsoft. B2B. BLL. zhaobiao"> </ASP: objectdatasource>

----------------------------

 

Public partial class zhaobiaozhongbiaomessage
Inherits system. Web. UI. usercontrol

Protected sub page_load (byval sender as object, byval e as system. eventargs) handles me. Load

End sub
Public Function STR (byval myobj as string, byval count as integer) as string
Dim mystr as string = myobj. tostring ()
Dim returnstr as string = mystr
If mystr. length> count then
Returnstr = mystr. substring (0, count) + "......"
End if
Return returnstr
End Function
End Class

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.