Wrox Programmer Forums
|
ASP.NET 3.5 Professionals If you are an experienced ASP.NET programmer, this is the forum for your 3.5 questions. Please also see the Visual Web Developer 2008 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 3.5 Professionals section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 13th, 2009, 09:05 AM
Friend of Wrox
 
Join Date: Jan 2006
Posts: 180
Thanks: 1
Thanked 1 Time in 1 Post
Send a message via ICQ to dpkbahuguna Send a message via MSN to dpkbahuguna Send a message via Yahoo to dpkbahuguna
Default Event In User Control.

Hello Friends,
I have telrik combo box , I m using this control as my Custom Control. Telrik combobox has an event named “ItemsRequested”.
I hv made an user control in which I have made a property suppose :
public string Query
{
get { return _Query; } set { _Query = value; }
}

Now I want to create an event for this control in my UserControl.ascx.cs file using delegate according to “Query “ property’s value that has been set for this control by user.
protected void Page_Load(object sender, EventArgs e)
{
if (_Query == "anything")
{
RadComboBox1.ItemsRequested += new Telerik.Web.UI.RadComboBoxItemsRequestedEventHandl er(KeyPressOnCombo);
}
}

Please tell me that in which event I can create this event because if I do this in Page_load of the control then I am getting my Control’s property always is blank while I have set the property with a string value.

I hope I have described my query nicely.


Thanks!!
__________________
DPK..
 
Old December 1st, 2009, 03:10 AM
Friend of Wrox
 
Join Date: Nov 2009
Posts: 156
Thanks: 13
Thanked 16 Times in 16 Posts
Default

in Page_Load write this codes:

if(Page.IsPostBack)
{
if (_Query == "anything")
{
RadComboBox1.ItemsRequested += new Telerik.Web.UI.RadComboBoxItemsRequestedEventHandl er(KeyPressOnCombo);
}
}
I think it works for the first time





Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamic Add User Control To The Tab Control cheer ASP.NET 3.5 Basics 1 February 25th, 2009 10:48 PM
How to raise event in user control webpart... tqit ASP.NET 2.0 Basics 1 September 13th, 2006 04:37 AM
User Control with my event ALGNET .NET Framework 2.0 1 May 2nd, 2006 05:56 PM
Add Windows User control in Web User Control agarwalvidhu C# 0 March 30th, 2006 01:17 AM
Programmatically Loaded User Control Event Handlin cgoldrin ASP.NET 1.0 and 1.1 Professional 4 December 2nd, 2003 09:59 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.