473,466 Members | 1,377 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 2126
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: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.