PC Review


Reply
Thread Tools Rate Thread

creating dynamic image and label names?

 
 
=?Utf-8?B?Y2hlZXplYmVldGxl?=
Guest
Posts: n/a
 
      7th Mar 2005

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
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
dynamic size of label, and depending on size label position of tex noord453 Microsoft Excel Programming 3 12th May 2009 01:54 PM
creating dynamic transparent image Jeff Microsoft ASP .NET 1 6th Nov 2006 09:14 AM
Help creating dynamic links & label fill in aspx simon Microsoft ASP .NET 1 1st Mar 2006 03:27 PM
Receiving #error when creating mailing label using label wizard =?Utf-8?B?RGVlX0RlZQ==?= Microsoft Access 2 1st Dec 2005 01:36 PM
creating dynamic image and label names? =?Utf-8?B?Y2hlZXplYmVldGxl?= Microsoft Dot NET 0 7th Mar 2005 04:19 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:42 PM.