473,327 Members | 2,074 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,327 software developers and data experts.

Help with DataTable and DataRow in WebForm.aspx

I would like to accomplish the following task in WebForm.aspx

I have a SQL SELECT query that INNER JOIN two tables (Device_Tbl and Detail_Tbl) which will return
Device_BtnID Status Z_Index Left_Px Top_Px On_Img Off_Im
ImgBtnLight 0 102 192px 72px image\light_on.gif image\light_off.gi
ImgBtnAC 0 102 192px 72px image\ac_on.gif image\ac_off.gi

Based on the return result, I would like to something like this
Dim status As Boolean = dr("Status"
Dim img As Strin
If (status = False) The
img = dr("Off_Img_File"
ElseIf (status = True) The
img = dr("On_Img_File"
End I

imgA.ID = dr("Device_BtnID"

With img
.ImageUrl = im
.Attributes("style") = "Z-INDEX:" & dr("Z_Index") & "; LEFT: " & dr("Left_Px") & "; POSITION: absolute; TOP:" & dr("Top_Px"
End Wit

Panel1.Controls.Add(imgA

I wrote the above codes to load the image for the image button according to its on/off status as well as its coordinate on the WebForm.aspx from the database. However it is working for just one image button. I would like to load lots of image button based on the data return from the SELECT query. Therefore before the end of data reutn from the query, I would like to do the same thing as above. Can anyone please help me on this issue

I used DataReader to load one image button, I wonder should I use DataReader or DataAdapter if loading lots of image buttons. In additon, how to loads the tables (Inner Join two tables) from the query to DataTable?

Thanks
Ester
Jul 21 '05 #1
2 2120
Hi Esther,

In my opinion you should have as much button pages available as there are
buttons on the currentscreen from that particular user.

When you have not so much buttons than you can maybe better make for every
page standard an immage page. This approach you are taking now will be very
nice however I think as well resources consuming.

And do not forget to test what your application does when there are more
users active.

I hope this helps anyhow?

Cor
Jul 21 '05 #2
Hi Ester,

This row from my clock sample.
Response.Cache.SetExpires(DateTime.Now.AddTicks(50 0))

That you need in my opinion definitly in your application.

Cor
Jul 21 '05 #3

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

Similar topics

2
by: Anita C | last post by:
Hi, How do I associate or map a specific column in a datatable to a particular element present in an xml document - to read into a datatable as well as write from the datatable to the xml element?...
1
by: Kelvin | last post by:
Hi All, I wrote a program insert new row between rows while the datatable is looping. It display the error message. Exception Details: System.ArgumentException: This row already belongs to this...
2
by: Newbie | last post by:
Im getting an exception: System.FormatException: Input string was not in a correct format. at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) at...
8
by: Tim::.. | last post by:
Can someone please tell me why I keep getting the following error for some of my web application users but not others??? Even though the application runs from a central webserver??? Thanks for...
2
by: JohnR | last post by:
Sorry if this is has an obvious answer, but I can't find it... I am using a datatable.select to obtain the rows in a datatable that meet certain criteria. My question is this: for each of the...
2
by: Ester | last post by:
I would like to accomplish the following task in WebForm.aspx I have a SQL SELECT query that INNER JOIN two tables (Device_Tbl and Detail_Tbl) which will return Device_BtnID Status Z_Index ...
1
by: sapkal.manish | last post by:
Question : How can I find actual row position of DataTable in DataGridView when DataTable is sorted / My source code like this Private WithEvent dgvInwDet as new DataGridView Private...
1
by: Maxwell2006 | last post by:
Hi, I am working with strongly typed datatables. What is the most efficient way to build a new DataTAble based on the result of DataTable.Select? At this point I use a foreach loop to do the...
1
by: seanmle | last post by:
I want to build a windows application that has a datagrid filled with data. When a person modifies information on a single cell, it updates the database without the user having to click on a save...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.