Hi,
I am confused with a simple code to display a content in asp.net3.5
Its working fine in localhost (with local DB and also if i connect with online DB and run the application in localhost)
but its not working in online.
Here is my code:
<body>
<form id="form1" runat="server">
<div id="center_page">
<table>
<tr><td><h3><asp:Label ID="lblttl" runat="server" Text="Label"></asp:Label></h3></td></tr>
<tr><td><asp:Image ID="imgbio" runat="server" ImageUrl="" /></td></tr>
<tr><td><asp:Label ID="lblbio" runat="server" Text="Label"></asp:Label></td></tr>
</table>
</div>
</form>
</body>
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Try
c1.connect_dancedb()
mycon = c1.adoconn
mycon.Open()
cmd = New MySqlCommand("select * from tblbios where id='" & Request.QueryString("id") & "'", mycon)
rdr = cmd.ExecuteReader
While rdr.Read
lblttl.Text = "Team: " & rdr("teamnm") & "<br><br>" & "Bio: " & rdr("nm")
lblbio.Text = rdr("bio")
imgbio.ImageUrl = "~/imgbio/" & rdr("imgpath")
End While
mycon.Close()
Catch ex As Exception
End Try
End Sub