473,657 Members | 2,516 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.EventArg s) 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_Approva l database.
UserRes = GAP.SelectCusto mApprovalProces sData
(_ListID, _ProjectName)
grdCustom.DataS ource = UserRes
grdCustom.DataB ind()
End Sub

'---------------webpage code-----------------------------
Private Sub Page_Load(ByVal sender As System.Object,
ByVal e As
System.EventArg s) Handles MyBase.Load
'Put user code to initialize the page here
Dim ctlCustAdmin As New CustomAdmin
ctlCustAdmin.Se tListId = 1
ctlCustAdmin.Se tProjectname = "test"
Page.Controls.A dd(ctlCustAdmin )
End Sub

Jul 21 '05 #1
0 1159

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

Similar topics

4
31211
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 http://searchvb.techtarget.com/tip/1,289483,sid8_gci535495,00.html which has the following: > Want to really get down to instants? This tip from reader Phil Lenoir tells you how. >...
1
2095
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 hidden) are in the Detail section of the report and their content is printed by secondary controls in the Bottom of the page section (CtrlAA, CtrlBB, CtrlCC, CtrlDD). When primary controls (CtrlA, CtrlB, CtrlC and CtrlD) are set to Visible,...
19
4162
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 retrieve the values... (ie: application.currentproject.properties(propName)) b.) creating global variables in the form of an array and using a function to populate and retrieve them.
16
9279
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 not consistent: (0x0c0001a5). Display.obj : error LNK2022: metadata operation failed (80131195) : Custom attributes are not consistent: (0x0c000108). The help for LNK2022 is completely useless:
21
2092
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 string with comma delimited values. For example, if I were to render two text boxes. One with the Value Terry and the Other with the Value 'Burns' I would get the following value Terry,Burns.
2
2578
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 good while and I'm getting really frustrated now! My problem is this - my custom controls periodically disappear from my
0
242
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 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
3
1262
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 before the paint. The problem is that the form's InitializeComponent() calls the control's constructor and then updates the control's properties with whatever it found during design time. So, i can change the properties in the constructor of the...
15
6505
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 accept other controls. The control i drag drop on it becomes the child of my custom control's parent form and not the child of my custom control. Then i added this line "" before my custom control class (i dont know what this line does). Now
0
8420
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8324
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8842
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8740
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8617
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7353
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6176
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4173
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
1733
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.