all groups > asp.net building controls > june 2004
Filter by week: 1 2 3 4 5
ViewState for Inner Class
Posted by Jinsong Liu at 6/30/2004 11:36:09 PM
I am creating a web custom control by extending the existing DataGrid
control. lets call it MyDataGrid here. I instantiated another class
which is also drived from the DataGrid control in the MyDataGrid. the
ViewState of the inner class get lose between page reload. is there
anyway that I can ma... more >>
listbox and sql stored procedure
Posted by John at 6/30/2004 4:31:37 PM
Hi,
First of all sorry for my not perfect english.
I've got listbox in my .aspx page where the users can make multiple
selection.
So, Users can select 7 items in listbox, I have to take value from items and
pass it to stored procedure to delete 7 rolls in my table. Thats simple,
but what if... more >>
Building child controls on Design Time
Posted by Pradeep Kumar C at 6/30/2004 11:50:58 AM
Hi ,
I am trying to create a custom control similar to datagrid.Grid contain
some thing like data column where i am able to add column during design time
using VS.NET 2003 collection editor , but on clicking the save button the
corresponding innercontrol is not return on the aspx page. But I... more >>
Custom Controls
Posted by Wannabe_Geek at 6/29/2004 11:34:01 PM
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.
Since its a custom Control I drag and drop and use it in my Pages. I overload the render method of my Cu... more >>
pass 2 parameters using HyperLink column?
Posted by google NO[at]SPAM joriz.is-a-geek.net at 6/29/2004 5:02:38 PM
is it possible?
thanks TIA.... more >>
Unable to access a control property - Stack Overflow..
Posted by Nelson F. at 6/29/2004 12:05:10 PM
I've made a user control (ascx and ascx.cs) that works fine if I use a
session var to pass it value. However, I'd much prefer to set a property
instead so I added a property. The problem is that when I try to access the
property, it generates a StackOverflowException. See the snip from my source
... more >>
Template Contents from Control
Posted by Iain at 6/28/2004 11:28:52 AM
I've developed some templated controls and I would like to pre-process the
templates before calling the instantiate methods.
How can I get at the actual text of a Template from the reference held in my
control?
Can I change it?
Iain
... more >>
Constituent Controls and Design Time
Posted by Jim-M at 6/26/2004 4:05:55 PM
I'm inheriting TextBox in my custom control...it has a property that is
type TextBox and will point to two other TextBox controls on the form.
This is working correctly, however at design time, the Property Browser
displays a "+" sign when the property is set to a control other than
(none). T... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Applying styles from multiple sources
Posted by DalePres at 6/26/2004 8:32:14 AM
Is there a way to determine the order or priority of applying styles in a
custom web control? For example, I have a control with default style
settings for many features, and exposed public properties to change those
settings as well. It is easy enough to set the value of the public property
t... more >>
Read a CSS File
Posted by Alphonse Giambrone at 6/25/2004 8:07:19 PM
Using vb.net.
Can anyone provide some insight or examples of reading a css file.
I want to be able to read the name/value pairs for some classes.
My asp.net app is using IE WebControls TabStrips which don't support css
from a file. That makes is a chore to change all the tab styles when needed.
... more >>
Composite control problem !!!
Posted by Mircea Pleteriu at 6/25/2004 10:28:39 AM
Hi all,
I have a composite control which only consists in a datagrid control for
beginning.
I create the datagrid control within the EnsureChildControls method and set
the AutoGeneratedColumns to false
My control exposes a method AddColumn(DataColumn column) which adds the
specified colu... more >>
Access User Control value during Page_Load
Posted by Cindy at 6/25/2004 5:19:07 AM
ASP.NET - C# (User Control)
I have a drop-down as usercontrol.
In the user control's Page_Init , the drop down gets
populated.
The SelectedItem.Text is retrived using property get
The Value of the drop-down is assigned using property set.
This user control is placed on an aspx page on... more >>
Dynamic Control Creation with Reflection?
Posted by localhost at 6/24/2004 5:46:38 PM
I have a DataTable with String-typed columns that looks like this:
[Col1] [Col2] [Col3]
"TextBox" "txtTest" "Enter Here"
Strictly programmtically in my code-behind, I want to create a TextBox
control on my page called txtTest with text inside already "Enter
Here". How would I do th... more >>
HELP! dropdown resets to a specific value on postback! (asp.net.vb)
Posted by usenet_daughter NO[at]SPAM yahoo.com at 6/24/2004 3:48:00 PM
I don't know how this is happening, but a dropdown control I have is
resetting to the 2nd value on the list anytime a postback occurs.
I have no initiation code outside of
If Not (IsPostBack)
I have EnableViewState set to true for the control - the control stays
populated, it just is l... more >>
Add a usercontrol to itself declaratively?
Posted by Jos at 6/23/2004 5:52:19 PM
Can you add a user control recursively to itself?
Imagine some kind of tree control, where every node is again a tree control.
Each node is populated with a DataList containing the child nodes.
I manage to add additional instances of the user control to the
item template in the ItemDataBou... more >>
How to implement Dynamic Properties?
Posted by Robert Sander at 6/23/2004 2:50:02 PM
Hi,
I've developed a custom web control with some properties. I want some of the properties to be bindable to a value that is defined in the application config file (Dynamic Properties). How do I declare such properties?
Thank,
Robert... more >>
Viewstate Issue?
Posted by SS at 6/23/2004 2:02:11 PM
Hi,
I've build a custom control that's essentially a header for my web site.
It's pretty simple, with just a property for an image source path, and a
collection of custom objects for links.
The custom class simply has properties for href, target, and name. The
collection implements Collection... more >>
viewstate for collapsable panel control
Posted by amit NO[at]SPAM c4ppy.net at 6/23/2004 2:56:08 AM
Hi.
I have built a custom control for a collapseable panel. The panel has
an image to which when clicked, fires a client side javascript
function that shows or hides the panel using DHTML. This javascript
funciton is registered to the page on render
This works fine for me except that when a p... more >>
Controlling dynamic contols
Posted by Assaf at 6/22/2004 5:22:31 PM
I'm looking for the 'right way' to save the state of dynamically created
custom controls. Here's the scenario:
Multiple instances of myCustomControl are added to a page programmatically
at run time. Because they are dynamic, I have to recreate all
myCustomControl's on every postback. For now, ... more >>
Non-visible control
Posted by Steve C. Orr [MVP, MCSD] at 6/22/2004 2:46:41 PM
I want to create a custom webcontrol similar to the SqlConnection control,
in that it is not actually drawn on the form. When you drop the control
onto a form it automatically gets put in the little non-visible tray at the
bottom of the webform.
Is there an attribute or something that will caus... more >>
Replacing a control dymamically (to use a webform as a template)
Posted by jorge at 6/22/2004 12:37:00 AM
Hi all,
I have to replace a bunch of controls dynamically (TextBoxes, DropDowns,
etc).
Any way to do this? The 'template' pages are made on asp.net with tables
(not runat=server) and asp:textboxes, etc.
So I need to do a loop on the controls of the webform, but alas! they are
read only. ... more >>
ControlCollection problem
Posted by Oleg Ogurok at 6/21/2004 5:34:54 PM
Hi all,
I'm trying to create a simple control that would take its inner controls and
add separators like " | " between them.
The inner controls will be declared inside ASPX like this:
<my:Control ....>
<asp:Button .... />
<asp:LinkButton .... />
<asp:Button .... />
</my:Contr... more >>
CssClass property not recognized by Inherited WebControl?
Posted by Dave at 6/21/2004 1:54:01 PM
Hi,
I'm trying to create a custom Linkbutton control by inheriting from WebControls
[ToolboxData("<{0}:MyLinkButtonrunat=server></{0}:MyLinkButton>")]
[ParseChildren(false)]
public class MyLinkButton: WebControl , IPostBackEventHandler
.....
I define my control in the aspx as:
<Cus... more >>
Composite Control Attributes
Posted by Alphonse Giambrone at 6/20/2004 10:22:27 PM
I am building a composite control in C# that contains a textbox and a
requiredfieldvalidator that I want to be able to add client side attributes
to.
If I use mycontrol.Attributes.Add(.....) the attributes are added to the
span element in the generated html.
How can I apply attributes to the ... more >>
Building User Contols in ASP.NET
Posted by sgelfmann NO[at]SPAM yahoo.com at 6/19/2004 4:48:16 PM
I am new to ASP.NET. So I am trying to learn from the book I just
bought. There is a simple example of how to build a user control
which I religiously typed into the Notepad, but the results are not
what was expected.
Here's what I did.
First, I created the user control and saved it in a file... more >>
Validation Summary Contol
Posted by Chris Kennedy at 6/19/2004 2:50:58 PM
I am trying to add a validate summary control to my composite control. I add
it to the controls collection and all the other validation control stop
working. My form is on the parent page and the composite control is embedded
in it. The submit button is just an ordinary button which triggers an e... more >>
RotateFlipType and PropertyGrid - Bug ???
Posted by BeerBoy at 6/17/2004 11:40:54 AM
I've writte a custom control which has a property of type RotateFlipType (
an enum from System.Drawing). Anyway, in design time when I look at the
property grid for an instance of the control the dropdown list showing
possible values has duplicate entries and some missing ones !!! Does anyone
kn... more >>
Complex control lifecycle issue
Posted by Iain at 6/16/2004 11:34:41 PM
I've built a control whose purpose is to render a shopping cart based on
templates and an Order object which gets passed to it.
I'm keeping the order object in the Session object and therefore have no
need to use ViewState for this control. Instead I create the ChildControls
based on what is ... more >>
Get Container Parent at Design Time
Posted by valerial NO[at]SPAM frlp.utn.edu.ar at 6/16/2004 12:58:15 PM
I have many panels into a container(it´s also a panel).
I want to get the container´s id from the child panels at design time.
When I create these child panels from code I can get the containerID
easily:
Panel panel = new Panel();
Controls.Add(panel);
then:
Panel container = panel.Parent... more >>
dinamically linkbuttons handler
Posted by oterox at 6/16/2004 10:45:28 AM
I've created a method for creating linkbuttons dinamically.It works fine if
the method is in the webform but if i try to put the method in a different
class it doesn't work:
--- webform1 ----- This works:
TextBox txt1 = new TextBox();
this.Controls.Add(txt1);
this.Controls.Add(createLnkB... more >>
saving class to viewstate
Posted by Angel at 6/16/2004 9:58:31 AM
I created a web control that accesses a class that performs certain functions. I wanted it saved in viewstate so i do not have to reload the data that is in it everytime i re render the control. But when i save the class to viewstate i get an error that it not serialized. i went back to the class an... more >>
dynamic loaing of the controls on the dynamically created page
Posted by abhishek dave via .NET 247 at 6/16/2004 12:51:44 AM
(Type your message here)
--------------------------------
From: abhishek dave
hi,
I have a problem regarding dynamically loading of the web page.
As I also want to dynamically load the controls onto the page(which is being dynamically created) inheriting the page
for eg
'this is a clas... more >>
Hierarchical binding in a WebServer Control with templates
Posted by Iain at 6/15/2004 2:08:32 PM
I want to build a templated control which will be the graphical
representation of a complex object.
So the object has a list of items (line items on an order) and some items
can contain other items (specifically, some items can be custom CDs with
individual tracks on).
So I when I come to r... more >>
Events in Custom Controls and Sub Classes
Posted by Reiner Max at 6/15/2004 1:18:26 PM
Hello i try do this.
Class DemoBase
Public Delegate Sub DemoItemEventHandler(ByVal sender As Object, ByVal e _
As DemoItemEventArgs)
Public Event ItemCreated(ByVal e As DemoItemEventArgs)
Protected Sub OnItemCreated(ByVal e As DemoItemEventArgs)
RaiseEvent ItemCreated(e)
End... more >>
UserControl and Session
Posted by Hai Nguyen at 6/15/2004 12:35:57 PM
Hi all
I encounter a problem but don't know how to solve it.
Here is my situtation:
I have a web page, 2 user controls: A and B. A and B are dynamically loaded
into the main page. In B there are 4 buttons, TextBox, object and
classes,...There is one object I want to save all of its values... more >>
responding to events raised by controls in a webcontrol
Posted by colter k?ntz via .NET 247 at 6/15/2004 11:58:04 AM
I am attempting to respond to the Click event of a button (WebControls.Button) that is programatically created by a WebControl. I want the event handler to be defined in the WebForm that is using my WebControl.
I bind an event handler to the Click event of the button, but it never seems to get ca... more >>
Validators in a user control
Posted by Geir Sanne at 6/15/2004 2:53:01 AM
ive made a usercontrol with some textboxes.
ive added some required field validators to the textoxes.
i made a page with a button and my user control.
when i click the button, how can i make the validators check the textboxes ?... more >>
ASP.Net Server Control's Site is ALWAYS Nothing
Posted by jjbutera NO[at]SPAM hotmail.com at 6/14/2004 2:58:56 PM
I want to set the datasource to a server control at run-time only
(because the datasource is stored in the web cache). The following
code I thought should do the trick, but Site is ALWAYS nothing.
If Not Me.Site Is Nothing AndAlso Me.Site.DesignMode = False Then
'My Code for run-time only
E... more >>
Getting id of composite child controls
Posted by Chris Kennedy at 6/14/2004 11:32:30 AM
I can't seem to get the id of the child controls of my composite control. I
can get the unique id but the id when I try to access it via the controls
collection comes back null. Do I need to add a form tag within the control
rather than on aspx parent page. Any ideas? Regards, Chris.
... more >>
.Net/General Advice Sought
Posted by Jolly Student at 6/13/2004 9:09:50 PM
Dear Colleagues:
Thank you for taking the time to read this - I recently posted here with
regards to what was possible with .NET.
I have been working as a systems engineer for about fifteen years now. My
"specialties" have been basically anything it took to get the job done,
althou... more >>
Question about DataBindings in subcontrols
Posted by LucaP at 6/12/2004 10:11:51 AM
Hi. I'm developing a custom webcontrol that have a property derived from
BaseCollection that realizes a collection of particular web controls. When i
edit the collection with the associated collection editor, it seems to work
but the (databindings) property throws a NullReferenceException when i ... more >>
Control.DataBind()
Posted by TheGG at 6/11/2004 7:43:01 PM
Control.DataBind() performs databinding for the current control and all child controls. How would I (within a Control subclass) _just_ perform databinding for the current control, and not the children?... more >>
how to use Enableviewstate property????
Posted by wpy at 6/11/2004 10:36:22 AM
Hi,
I had built a composite control but I don't want to preserve control
state automatically. I set the enableviewstate property of every sub
control within the composite control to false. But it does not work,
controls still preserve the state automatically. How can I set the asp.net
con... more >>
General .Net questions
Posted by Jolly Student at 6/11/2004 2:16:35 AM
Dear Colleagues:
I am a systems guy who has been working with hardware, networking and basic
scripting for ten years or so. I have been given the opportunity to attend
..Net classes of all sorts as part of the MSDN training track. I already
have the MCSE track under my belt and that is where... more >>
Catch Rendered Output?
Posted by localhost at 6/10/2004 4:13:40 PM
I have a 3rd party component in my asp.net page. It has a Prerender
event that I can hook. Within that event, how can I find the final
HTML output that it makes? I would like to modify the HTML string
before it goes to the page's rendered output.
Thanks.... more >>
Persisting a property (e.g. TabIndex) in a control's Tag on creation
Posted by Ahmet Gunes at 6/10/2004 4:06:20 PM
Hi Friends,
I'm building a web control. I came to a point that I have to persist a =
property (especially TabIndex) in the control's tag when the control is =
dropped on a Web form.
I tried several methods but none of them worked. Here is one of the =
methods I tried:
<PersistenceMode(... more >>
Hidden Textbox
Posted by Rob T at 6/10/2004 12:04:23 PM
I have a user control that need to have a hidden textbox. (I have some JS
that needs to get some info out of it) If I make a standard textbox
(<asp:TextBox ID="txtTest" Runat="server" />) in my control it works
fine....of course it shows it on the screen
It seems so simple...but how the heck... more >>
Saving a Collection to ViewState
Posted by Angel at 6/10/2004 11:40:01 AM
I built a webcontrol and within the control I build a collection of properties I would Like to store so I do not have to rebuild it everytime there is a postback. I store the collection in viewstate and get the following error when I run a page with my control on it:
The Type 'myCollection' must ... more >>
help for properties persistence
Posted by LucaP at 6/9/2004 8:32:17 PM
Hi. I'm developing a WebControl that uses the following custom attributes:
[ParseChildren(false), PersistChildren(false)]
I'm using ParseChildren(false), because i've got two collection properties
that use the following custom attributes:
[NotifyParentProperty(true),
PersistenceMode(Persi... more >>
Retaining WebControl Properties
Posted by Angel at 6/9/2004 6:26:54 PM
I have built a web control that inherits from webcontrol class. When using the control I created in a project, I set certain properties such as the Font, font size that were inherit in the webcontrol class. When I perform a postback to the server those properties that I set with values are not retai... more >>
|