471,334 Members | 1,372 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,334 software developers and data experts.

creating dynamic image and label names?


I am trying to create a database driven page where all labels and images
come from the database. I am trying to do it the following way:

Try
'Open the connection and execute the Command
objConnection.Open()
objReader = objcommand.ExecuteReader()

While objReader.Read()

objReader("labelName").ImageUrl = "images/" & objReader("content")
End While

Catch err As Exception
divError.InnerHtml = err.ToString()
End Try

The error that I get is:

System.MissingMemberException: Public member 'ImageUrl' on type 'String' not
found. at
Microsoft.VisualBasic.CompilerServices.LateBinding .InternalLateSet(Object o,
Type& objType, String name, Object[] args, String[] paramnames, Boolean
OptimisticSet, CallType UseCallType) at
Microsoft.VisualBasic.CompilerServices.LateBinding .LateSetComplex(Object o,
Type objType, String name, Object[] args, String[] paramnames, Boolean
OptimisticSet, Boolean RValueBase) at SellTiona.LoginForm.Page_Load(Object
sender, EventArgs e)

Does anyone know how to get around the issue of objReader("labelName")
coming back as string. I looked into converting it to image type but could
not figure out how to do it
Jul 21 '05 #1
0 804

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by cheezebeetle | last post: by
2 posts views Thread by Technical Group | last post: by
2 posts views Thread by webonomic | last post: by
3 posts views Thread by Colin | last post: by
reply views Thread by Andrew | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.