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

custom control timing

Dan
i have a custom control. In the page load of the control
I call a procedure
called binddata which gets a dataset and binds to a gird.
Then in my webform
I create and instance of the control and set the ListId
and ProjectName
properties and then add the control to the page. On the
load i'm getting an
error that an instance of an object is not set....this
error is occuring
because my dataset is returning null in the binddata
method because the
values that i'm passing in _listid and _projectname are
null even though I
set these properties in the page load of the web form.
Any Ideas on what
I"m doing wrong

'--------------Control Code--------------------
Private _ListID As Integer
Private _ProjectName As String

Public WriteOnly Property SetListID()
Set(ByVal Value)
_ListID = Value
End Set
End Property

Public WriteOnly Property SetProjectName()
Set(ByVal Value)
_ProjectName = Value
End Set
End Property

Private Sub Page_Load(ByVal sender As System.Object,
ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
If Not IsPostBack Then
BindData()
End If
End Sub

private Sub BindData()
Dim UserRes As New DataSet

'Using GAP Web Service to get values from
ATG_Web_Approval database.
UserRes = GAP.SelectCustomApprovalProcessData
(_ListID, _ProjectName)
grdCustom.DataSource = UserRes
grdCustom.DataBind()
End Sub

'---------------webpage code-----------------------------
Private Sub Page_Load(ByVal sender As System.Object,
ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
Dim ctlCustAdmin As New CustomAdmin
ctlCustAdmin.SetListId = 1
ctlCustAdmin.SetProjectname = "test"
Page.Controls.Add(ctlCustAdmin)
End Sub

Nov 22 '05 #1
0 647

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

Similar topics

4
by: William Bub | last post by:
Is there an accurate way to create a "stopwatch" good to 1/10 of a second? I'm not sure if I should use the timer control, or some way to access the computer timer. I found the following site...
0
by: Dan | last post by:
i have a custom control. In the page load of the control I call a procedure called binddata which gets a dataset and binds to a gird. Then in my webform I create and instance of the control and...
1
by: Michel Boivin, ing. | last post by:
I experience a curious behavior with hidden controls in a Report. The value of each primary control (CtrlA, CtrlB, CtrlC, CtrlD) is the result of a function call. These controls (intended to be...
19
by: laurenq uantrell | last post by:
I'm using Access 2K. I'm hoping someone can tell me which method performs faster- (currently I'm using a mix of both methods) a.) creating custom properties and then calling functions to set and...
16
by: Bret Pehrson | last post by:
I've converted a non-trivial C++ library to managed, and get the following unhelpful linker error: Assignment.obj : error LNK2022: metadata operation failed (80131195) : Custom attributes are...
21
by: One Handed Man \( OHM - Terry Burns \) | last post by:
When using a custom control. In order to check and see if values have changed one has to implement the IPostBackDataCollection interface. The values returned for the control seem to be simply a...
1
by: Wannabe_Geek | last post by:
Hi Iam new to MS .Net technology just getting along with it....I created a custom control ,which takes in a query and displays the data in a tabular format....something similar to a datagrid. ...
2
by: Suzanne | last post by:
Hi all, I'm reposting this message as I'm experiencing this problem more and more frequently : I really hope someone out there can help me as I've been tearing my hair out on this one for a...
3
by: codeslinger73 | last post by:
I ran into sort of a timing issue. I want to hold some default properties for form controls (font, borderstyle, etc) in the registry or a config file and then update these things after init but...
15
by: rizwanahmed24 | last post by:
Hello i have made a custom control. i have placed a panel on it. I want this panel to behave just like the normal panel. The problem i was having is that the panel on my custom control doesnt...
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...
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...
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...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: 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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

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.