473,322 Members | 1,232 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,322 software developers and data experts.

getting info to a UserControl?

I'm having trouble getting information passed to a UserControl that I
wrote.
Within the control is an ObjectDataSource that populates a GridView on
the control. The Select method for the ObjectDataSource gets invoked
prior to almost anything else going on with the control, so the
GridView isn't available yet. No public properties seem to be
available yet. I put a hidden field on the control, but it's not
available yet.
Within that Select method, I need to get a value from the Repeater
item that the control is on. How might I do this? I'm just wanting
to pass an integer.

May 10 '07 #1
1 1014
On May 10, 6:30 pm, HockeyFan <les.stock...@gmail.comwrote:
I'm having trouble getting information passed to a UserControl that I
wrote.
Within the control is an ObjectDataSource that populates a GridView on
the control. The Select method for the ObjectDataSource gets invoked
prior to almost anything else going on with the control, so the
GridView isn't available yet. No public properties seem to be
available yet. I put a hidden field on the control, but it's not
available yet.
Within that Select method, I need to get a value from the Repeater
item that the control is on. How might I do this? I'm just wanting
to pass an integer.

I think a public property could help

private int _selectid;

[Bindable(true), Category("Behavior"), Description("...")]
public int SelectId
{
get
{
return _selectid;
}
set
{
_selectid= value;
}
}

add this in your class

and use the _selectid in your SELECT

May 10 '07 #2

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

Similar topics

2
by: Cederstrom | last post by:
Hello Group, I have created an ASP.NET page. The page consist of the following items: - Button A - Button B - UserControl When I press Button A, I execute the following code: ViewState =...
0
by: Pingo | last post by:
Hi! How do I handle a Page event in my UserControl. My .aspx page contain 5 different buttons and one of them is the SAVE button. All buttons do PostBack to the page but only one should Save...
0
by: John Shum | last post by:
I prepare a UserControl that act as a lookup control, once the code is enter in the TextBox, the description will appear in another TextBox outside the UserControl of the same row in a DataGrid via...
1
by: Ray Cassick \(Home\) | last post by:
Ok, here is apparently another odd one... I am (as I said in a previous posting here) building a user control that inherits from System.Windows.Forms.UserControl. This base class contains a...
1
by: Bharath | last post by:
Hi All, I'm embedding a windows user control in aspx page and showing the user control in the IE, the problem that I'm facing is that the user session of the parent application is getting expired...
0
by: Paul | last post by:
Hello, and Good Morning, I need to Cross-page post some values to the target page. Since I am using Master pages and User Controls, I am finding it hard to get the thing working, so I am...
4
by: Jeff | last post by:
Hey asp.net 2.0 I have a UserControl which contain many TextBoxes. When I from the webpage (the webpage containing this UserControl) click on a button to start save the text in the textBoxes,...
2
by: Franky | last post by:
Threre is a Form containing a usercontrol In the form's Load event it references a usercontrol property, say, zz The first showdialog(formx) causes 1 usercontrol_load event 2 form_load event...
5
by: darrel | last post by:
This is an issue I brought up probably a year or so ago, got some advice, then was sidetracked on the project until now. So, here I am again. ;o) The situation is that we have an older chunk of...
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...
1
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: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
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: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.