Want to build the ChatGPT based Apps? Start here
Become a member
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
C# Corner Home
Technologies
Monthly Leaders
ASK A QUESTION
Forum guidelines
mazez sha
0
93
0
How to retrieve data from a session table
Sep 25 2011 11:45 PM
I developing an invoice page where user will select Product from a combo box (approx. 500 + item). I am loading product Name, Product ID, sales price in a session Table. After selecting the product, a textbox value will Sales Price. But it is taking so much time.
On page load event:
PBProductID.DataSource = Session(
"TableProductAll"
)
PBProductID.DataBind()
Session("TableProductAll") is filled when user first login to the system in the login page
On PBProductID_SelectedIndexChanged event:
Dim
strCriteria
As
String
=
""
PBSalesPrice.Text = 0
strCriteria =
" ProductID = '"
& PBProductID.Text &
"'"
Dim
SearchRow
As
DataRow() = Session(
"TableProductAll"
).Select(strCriteria)
If
SearchRow.Count > 0
Then
PBSalesPrice.Text = SearchRow(0)(
"pPriceSales"
).ToString
How to reduce the time at PBProductID_SelectedIndexChanged event (at present it taking apprx. 45 sec or more)
Looking for a better solution of way to fill a combo box and retrieve sales price from that table after selecting the product ID.
Reply
Answers (
2
)
Render DataTable, how?
Dropdown style in Datagridview in Windows appl