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

Set webcontrol properties before control is rendered?

I have a web control that has a property of UserId.

I need to set the userid before rendering the control, because based on who
is logged in, it displays something different.

If I set the properties in page load for the page the control is placed on,
it seems that is post render because the control doesnt work. If I set the
UserId in the GUI and compile it, the control works fine, but that obviously
isn't acceptable.

Where can I set the properties before the control is rendered, or how can i
re-render the control?

Thanks!
Nov 18 '05 #1
1 1398
Hi PJ:

Page_Load certainly happens before the control renders, so something
else is amiss. Could you post some code? We could diagnose.

--
Scott
http://www.OdeToCode.com/

On Fri, 1 Oct 2004 14:55:07 -0700, "PokerJoker"
<Po********@discussions.microsoft.com> wrote:
I have a web control that has a property of UserId.

I need to set the userid before rendering the control, because based on who
is logged in, it displays something different.

If I set the properties in page load for the page the control is placed on,
it seems that is post render because the control doesnt work. If I set the
UserId in the GUI and compile it, the control works fine, but that obviously
isn't acceptable.

Where can I set the properties before the control is rendered, or how can i
re-render the control?

Thanks!


Nov 18 '05 #2

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

Similar topics

0
by: Lucas, Todd | last post by:
Hello everyone! I'm having a problem with a WebControl that I'm designing for a Menu. I've been at it for about 3 weeks now, and can't seem to get around this problem. So I'm hoping that someone...
9
by: kw | last post by:
What is the proper way to get the element ID for a client script? For example, suppose in the WebControl: TextBox t=new TextBox; t.ID=this.ClientID+"X"; .... Then elsewhere we want to access...
0
by: Alex Nitulescu | last post by:
Hi, I have the following in project "RaducuCustomControls": Imports System.ComponentModel Imports System.Web.UI <DefaultProperty("Text"), ToolboxData("<{0}:Rotator1...
1
by: tolisss | last post by:
Hi i m trying to find a way to create a user control that will have a mix of server controls but i cannot find a way to get the html that these controls are going to render before my control is...
0
by: Charlie | last post by:
When a property of a WebControl is changed at design-time in the property window, the Render method for that WebControls runs. When the property of one WebControl cascades to another WebControl,...
0
by: Demetri | last post by:
I have created a web control that can be rendered as either a linkbutton or a button. It is a ConfirmButton control that allows a developer to force a user to confirm if they intended to click it...
3
by: Bob | last post by:
Hi, I 'm starting asp.net and i saw two ways to make buttons. Which way to use? Are the htmlbuttons in specific case better than webbuttons? Are there advantages? Thanks Bob htmlbutton:...
0
by: Henrik Stidsen | last post by:
I need to get the HTML output from a webcontrol as a string instead of it being rendered on the page. I have the following code: Dim SiteMapSource As New SiteMapDataSource() Dim TreeView1...
6
by: Dave Harvey | last post by:
I have developed a standard .NET control which displays medical images and works fine in applications, but increasingly, my customers are wishing to use it in an ASP.NET environment, so I am...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: 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
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,...
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...

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.