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