473,386 Members | 1,720 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

help needed

nil
hello all...
i did one coding to bind an image in the datagrid but the problem is
that it binds every
image control with the last image in the dataset...actually i am
storing path in the oracle.

here's the coding that i did..

private sub dg_itembound(byval sender as object,byval e as
system.web.ui.webcontrols.datagriditemeventargs) handles db.itembound

dim i as integer

dim img as image

dim str as string

str="Select image from member_data where " & ddltype.selectitem.value &
"like initcap('"& txtsrch.text &"%')"

ds=dbconn(str)

for i=0 to ds.tables(0).rows.count-1 step 1

if e.item.itemtype=listitemtype.alteringitem or
e.item.itemtype=listitemtype.item then

img=ctype(e.item.cells(1).controls(1),system.web.u i.webcontrols.image)

img.imageurl=ds.tables(0).rows(i).item("item")

end if
next
end sub

i did above coding as when user searches for his profile by name..then
there may be more then one name user so i want to bind
the image in the grid..so please help me out..thanks in advance

Nov 30 '06 #1
1 846
That would be because the select condition for your sql never changes
-- it is always txtsrch.text

Is it possible to rewrite the query such that it fetches the image url
for each returned row?

On 30 Nov 2006 03:24:42 -0800, "nil" <Ni**************@gmail.com>
wrote:
>hello all...
i did one coding to bind an image in the datagrid but the problem is
that it binds every
image control with the last image in the dataset...actually i am
storing path in the oracle.

here's the coding that i did..

private sub dg_itembound(byval sender as object,byval e as
system.web.ui.webcontrols.datagriditemeventargs ) handles db.itembound

dim i as integer

dim img as image

dim str as string

str="Select image from member_data where " & ddltype.selectitem.value &
"like initcap('"& txtsrch.text &"%')"

ds=dbconn(str)

for i=0 to ds.tables(0).rows.count-1 step 1

if e.item.itemtype=listitemtype.alteringitem or
e.item.itemtype=listitemtype.item then

img=ctype(e.item.cells(1).controls(1),system.web.u i.webcontrols.image)

img.imageurl=ds.tables(0).rows(i).item("item")

end if
next
end sub

i did above coding as when user searches for his profile by name..then
there may be more then one name user so i want to bind
the image in the grid..so please help me out..thanks in advance
--

Bits.Bytes.
http://bytes.thinkersroom.com
Nov 30 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

28
by: stu_gots | last post by:
I have been losing sleep over this puzzle, and I'm convinced my train of thought is heading in the wrong direction. It is difficult to explain my circumstances, so I will present an identical...
7
by: ChadDiesel | last post by:
Hello everyone, I'm having a problem with Access that I need some help with. The short version is, I want to print a list of parts and part quantities that belong to a certain part group---One...
7
by: Tina | last post by:
I have an asp project that has 144 aspx/ascx pages, most with large code-behind files. Recently my dev box has been straining and taking long times to reneder the pages in the dev environment. ...
10
by: Mae Lim | last post by:
Dear all, I'm new to C# WebServices. I compile the WebService project it return no errors "Build: 1 succeeded, 0 failed, 0 skipped". Basically I have 2 WebMethod, when I try to invoke the...
2
by: trihanhcie | last post by:
I m currently working on a Unix server with a fedora 3 as an os My current version of mysql is 3.23.58. I'd like to upgrade the version to 5.0.18. After downloading from MYSQL.COM the package on...
2
by: Steve K | last post by:
I got a bit of a problem I like some help on. I'm designing an online training module for people that work in food processing plants. This is my target audience. These workers have little or no...
3
by: Kitana907 | last post by:
Hi- I'm attempting to write a module that uses and updates info from two tables and does the following: Opens the recordset of a table called "tblstoreinv" If the Needed Field in the...
9
by: smartbei | last post by:
Hello, I am a newbie with python, though I am having a lot of fun using it. Here is one of the excersizes I am trying to complete: the program is supposed to find the coin combination so that with...
2
by: rookiejavadude | last post by:
I'm have most of my java script done but can not figure out how to add a few buttons. I need to add a delete and add buttong to my existing java program. Not sure were to add it on how. Can anyone...
32
by: =?Utf-8?B?U2l2?= | last post by:
I have a form that I programmatically generate some check boxes and labels on. Later on when I want to draw the form with different data I want to clear the previously created items and then put...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.