Ask a Question related to Dreamweaver AppDev, Design and Development.
-
Brandon Taylor #1
assigning ImageURL value of asp:image tag from DataReader
Hello all, I'm using VB.NET, Access
I have 20 images on a page, which are within nested tables. The images
create a property map for a neighborhood.
What I would like to accomplish is to set the ImageURL value of each image
as I iterate through a Data Reader on pageLoad.
I made a User Control which retrieves one value using a data reader, but
that's 20 trips to the DB. It would seem that I should be able to retrieve
all of the data at once when the page loads, then iterate through it to
assign the ImageURL property for each asp:image, but I don't know the
syntax.
Any advice appreciated!
Brandon
Brandon Taylor Guest
-
Changing the width/height when using Hyperlink.ImageUrl
I am using the ImageUrl property of the Hyperlink control to create a graphical Hyperlink. However, I want to change the size of the image I am... -
Collection Property problems with Image control ImageUrl property and URLBuilder
Been using reflector and examining what Microsoft does with the Rows property in the Table class. It looks like all of the items added to the rows... -
More Collection Property problems with Image control ImageUrl property and URLBuilder
After a few more hours of debugging I discovered that the URLBuilder solution that I mentioned previously does not work because there is no service... -
Changing ImageURL of Image Button which is added in template column of datagrid
hello, I have a template column in my datagrid. To the header of template colum, i have added imagebutton. On click of the imagebutton , i... -
Hyperlink w/ImageUrl bug?
I can't find any issue in the MS KB, but I'm experiencing the following problem which seems to be specific to IE5, and NOT any other version of IE... -
Paul Whitham TMM #2
Re: assigning ImageURL value of asp:image tag from DataReader
Why are using a datareader. If you have multiple calls on the page it seems
to be a prime candidate for using a dataset and dataviews, which only
require one trip to the DB
--
Regards
Paul Whitham
Macromedia Certified Professional for Dreamweaver MX2004
Valleybiz Internet Design
[url]www.valleybiz.net[/url]
Team Macromedia Volunteer for Ultradev/Dreamweaver MX
[url]www.macromedia.com/support/forums/team_macromedia[/url]
"Brandon Taylor" <bt@btaylordesign.com> wrote in message
news:d6if84$8pv$1@forums.macromedia.com...> Hello all, I'm using VB.NET, Access
>
> I have 20 images on a page, which are within nested tables. The images
> create a property map for a neighborhood.
>
> What I would like to accomplish is to set the ImageURL value of each image
> as I iterate through a Data Reader on pageLoad.
>
> I made a User Control which retrieves one value using a data reader, but
> that's 20 trips to the DB. It would seem that I should be able to retrieve
> all of the data at once when the page loads, then iterate through it to
> assign the ImageURL property for each asp:image, but I don't know the
> syntax.
>
> Any advice appreciated!
> Brandon
>
>
Paul Whitham TMM Guest
-
Brandon Taylor #3
Re: assigning ImageURL value of asp:image tag from DataReader
Hi Paul,
After doing a little more research, A DataSet with a Table seems the best
choice. I'm not familiar with how to access the rows and columns of a
DataTable so that I could iterate through them and then set the image
sources in a for each loop, but I was thinking something like this:
Dim intCount as integer = 0
For Each dr As DataRow In Dataset.Tables("Table")
imagename(-intCount.imageurl =
Dataset.Tables("Images").row(intCount)("ImageURL") )
intCount += 1
Next
I just need to know how to fill the DataTable once I have created the
DataSet, and I think I can take it from there.
"Paul Whitham TMM" <paul@valleybiz.net> wrote in message
news:d6jhk5$nk6$1@forums.macromedia.com...> Why are using a datareader. If you have multiple calls on the page it
> seems
> to be a prime candidate for using a dataset and dataviews, which only
> require one trip to the DB
>
> --
> Regards
>
> Paul Whitham
> Macromedia Certified Professional for Dreamweaver MX2004
> Valleybiz Internet Design
> [url]www.valleybiz.net[/url]
>
> Team Macromedia Volunteer for Ultradev/Dreamweaver MX
> [url]www.macromedia.com/support/forums/team_macromedia[/url]
>
> "Brandon Taylor" <bt@btaylordesign.com> wrote in message
> news:d6if84$8pv$1@forums.macromedia.com...>>> Hello all, I'm using VB.NET, Access
>>
>> I have 20 images on a page, which are within nested tables. The images
>> create a property map for a neighborhood.
>>
>> What I would like to accomplish is to set the ImageURL value of each
>> image
>> as I iterate through a Data Reader on pageLoad.
>>
>> I made a User Control which retrieves one value using a data reader, but
>> that's 20 trips to the DB. It would seem that I should be able to
>> retrieve
>> all of the data at once when the page loads, then iterate through it to
>> assign the ImageURL property for each asp:image, but I don't know the
>> syntax.
>>
>> Any advice appreciated!
>> Brandon
>>
>>
>
Brandon Taylor Guest



Reply With Quote

