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

weird user control behaviour - please help!

hi guys

following on from my previous post. ive got this strange error now. my user
control has the following property defined...

private string theSQL;
public string contactSQL
{
get { return theSQL != null ? theSQL : "na"; }#
set { theSQL = value; }
}

then in my ascx.cs page_load (for the control), ive got

contactSQL = "test";

now then, ive got in my aspx page..

protected dartsUC_contactsearch dartsUC_contactsearch1;

if i try

response.write(dartsUC_contactsearch1.contactSQL); from my aspx.cs
page_load, i get "na" on screen.

however, if i try <%= dartsUC_contactsearch1.contactSQL %>, i get "test" on
screen.

It's like the aspx page_load is happening before the ascx page_load,
therefore theres nothing in contactSQL, but when it runs the html inline,
page_loads have finished and all's well. however, I need access to the
contactSQL variable in my codebehind to execute the sql statement.

How can I fix this? any help aprpeciated!

cheers
Dan
Nov 18 '05 #1
0 995

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

Similar topics

2
by: Bhavna | last post by:
hello Can anyone help me with a problem i have I have made an array to hold values. I am adding values to this array when the user clicks an 'Add' butto If Not ((CBoxMealName.Text = "") Or...
8
by: Deano | last post by:
Here's the code; Private Sub txtTeachName_LostFocus() If IsNull(Me.txtName) Then 'line A Forms!frmMainform!frmSubform.Locked = True GoTo Exit_txtName Else 'line B...
1
by: Strange Cat | last post by:
Hi everyone! I have a weird problem with FormsAuthentication. I have an app that works just fine with FormsAuthentication. The user requests the homepage, he is redirected to login page,...
1
by: hecsan07 | last post by:
I am trying to perform site login using values from a cookie, but for some weird reason the cookie is being destroyed after the browser window is closed. I checked the browser settings for the...
2
by: Kiran | last post by:
Hi, I use a lot of web user controls for web development. And I need all your views on this. (1)Does the functionality(Logic part) of a web user control should be included in the aspx page...
10
by: Charles Law | last post by:
For some reason, when I click the X to close my MDI parent form, the action appears to be re-directed to one of the MDI child forms, and the parent remains open. I am then unable to close the...
1
by: Mr. Morad Jamal | last post by:
Hi all , and lets Get to the point : To create the Problem i have ,please do this : info : ASP.net 1.1, 1 - Create a Sub that Contains a code to creat a control Like a dropdown List and...
0
by: Tom Edelbrok | last post by:
I'm using VS 2005 to develop an intranet asp.net web application and I get a weird situation. If I start out with any ASPX page that contains an ImageButton control followed by a TextBox control,...
5
by: =?Utf-8?B?UGF1bA==?= | last post by:
Hallo, I have a radiobuttonlist control that is added on a custom Web User Control. This control has a property that exposes the SelectedIndex property of the embedded radiobuttonlist. When...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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,...
0
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...
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...

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.