all groups > asp.net building controls > august 2006
UserControl with databound repeater drops values on postback
Posted by paul.hester NO[at]SPAM gmail.com at 8/31/2006 9:41:41 PM
Hi all,
I have a user control that contains a repeater that generates a list of
check boxes. The checkboxes render fine, but they don't maintain their
checked state on postback.
I've tried using Page_Load, Page_Init, OnInit, enabling and disabling
viewstate without success. Any help would b... more >>
Image Viewer Control
Posted by Kuldeep at 8/31/2006 12:00:00 AM
Hello All,
Could anybody please give me ideas on building a Image viewer control
regards,
Kuldeep
... more >>
Bug in ASP.Net 2.0 ValidatorHookupControl (js) / HtmlTextWriter.Writeline ?
Posted by Martin at 8/31/2006 12:00:00 AM
Hi,
I'm working on a rendered control that I'm trying to put client side
validation into.
The issue I'm having is that ValidatorHookupControl isn't working for me.
This appears to be because my markup uses the input tag in lower case, but
ValidatorHookupControl has code like
if (contro... more >>
RegisterClientScriptBlock with rendered control?
Posted by Martin at 8/30/2006 2:39:36 PM
Hi,
Are there any issues using ClientScriptManager.RegisterClientScriptBlock in
a rendered control?
I'm calling this function within the overriden Render method of my
WebControl, but nothing the script is not coming out in my page source.
After calling RegisterClientScriptBlock, a call to... more >>
UserControl values lost on PostBack
Posted by paul.hester NO[at]SPAM gmail.com at 8/29/2006 6:43:02 PM
Hi all,
I have a very simple user control that contains 3 drop downs. Whenever
there's a postback the values of these drop downs are lost. I've tried
enabling viewstate everywhere without success. Could anyone shed any
light on what's going wrong?
Thanks,
Paul
Asx:
<%@ Control Lang... more >>
capture Multiple events in server controls
Posted by NO[at]SPAM rturo at 8/29/2006 7:22:02 AM
Im try to build a control with multiple events rised by different elements
but can't find any advanced example that can help me with this.
In the case of GridView, it fires many events, one of those is
SelectedIndexChaged and other is RowDeleted. when you look at the client
script they prod... more >>
Exposing an event handler as a control property
Posted by paul.hester NO[at]SPAM gmail.com at 8/27/2006 10:26:51 PM
Hi all,
I have a custom server control that can contain one or more buttons.
I'm trying to expose an event handler as a property so that the buttons
can fire a click event when clicked. However, I'm getting the following
error:
Cannot create an object of type 'System.EventHandler' from its ... more >>
Where in the page lifecycle does validation occur?
Posted by paul.hester NO[at]SPAM gmail.com at 8/25/2006 1:05:16 AM
Hi all,
I don't use auto postbacks on my web site to keep it javascript-free
and browser agnostic. Whenever there's a postback to my page I'm using
the Page_Load event to use the posted data for database updates.
However, the page hasn't been validated at this point. I can call
Validate() at ... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Dirty property value persist problem
Posted by yp.yean NO[at]SPAM gmail.com at 8/23/2006 9:20:51 PM
Hi,
I created a custom control, and encountered a dirty property value
persistence problem.
I created a property with a custom class type, call SQLSettings which
holds the SQL connection parameters, the class as follows:
public sealed class SQLSettings
{
private string serverNam... more >>
Datalist question
Posted by Islamegy® at 8/23/2006 4:44:44 PM
I'm using a datalist with Repeat Column = 2..
Which will be Rendered
<TR>
<TD></TD>
<TD></TD>
</TR>
now i want to add horizontal seprator.. I mean new row with doted line.. so
i try to insert TableRow control between each row, but when i rty to
override AddedControls i found all con... more >>
ASP.NET 2 WebControl development book?
Posted by Johno at 8/22/2006 7:51:02 AM
Can anyone recommend any books on ASP.NET 2 web control development. The
Nikhil Kothari book I already have covers only ASPNET 1.x and I'm trying to
use some of the new ASP.NET 2 webcontrol features without any luck, e.g. I am
struggling with WebResource.axd - I've got it working fine but tryi... more >>
How do I add server -side code at runtime?
Posted by bestwerx NO[at]SPAM gmail.com at 8/22/2006 4:49:07 AM
I am building an application that is totally data driven. The pages are
built from scratch at runtime.I have everything working fine. Now all I
need to do is to have the ability to add code both server-side and
client-sie at runtime. I think I have pretttty much figured out the
client side part.... more >>
Numberic textbox
Posted by close browser without Logout at 8/21/2006 2:46:02 AM
hi,
i need to create a numeric textbox control which accepts only numbers,
decimal point, backspace, arrow keys, should not allow pasting contents...
etc.
i've created a web user control by extending TextBox class and added a
javascript attribute to it as base.attributes.add("onkeydown",... more >>
control id and name for postback mechanism
Posted by Martin at 8/18/2006 12:00:00 AM
Hi,
This may be a dumb question, but why is it necessary for a control's id and
name attribute to coincide in order for the postback mechanism to work?
Given that it appears to be necessary, why are they not wired to be the same
value in a base class like control or webcontrol?
Thanks
... more >>
Position in Page after a "Submit"
Posted by Paul at 8/16/2006 11:42:09 AM
I'm just in the process of developing a web server component and have come
up against one final problem. It's like a data grid in that it displays
rows of data - which can be edited / updated in-line. The edit / update
buttons are child ASP:button controls. I have all the functionality work... more >>
Inherited DropDownList and asp:listitems
Posted by Arthur Dent at 8/15/2006 3:02:30 PM
Hi all,
I have a control which i wrote which inherits the asp:dropdownlist control.
Works great, all happy.
If when using it i try to declaratively add some items, it complains that
they are unknown types. eg...
<mytag:mydropdownlist id="lstInherited" runat="server"
appenddatabounditems... more >>
IPostBackDataHandler not working properly with DataGrid
Posted by buzlite NO[at]SPAM sympatico.ca at 8/11/2006 3:50:59 PM
Hello All,
I've posted this in
microsoft.public.dotnet.framework.aspnet.datagridcontrol but got not
reply so I'll try my luck here.
Any help would be greatly appreciated.
Thanks
I am having some difficulties with a user control implementing
IPostBackDataHandler when it is placed i... more >>
Control level communication
Posted by CompiledMonkey at 8/10/2006 9:43:19 AM
I'm building a set of custom server controls that need to perform
certain actions based on state. So, when a button is clicked in server
control 1, I'd like to call a method from server control 2.
I had considered developing a master control that contains references
to each of the children co... more >>
Capture an Event in a composite control From control on a page
Posted by gdick NO[at]SPAM kerrhenderson.com at 8/10/2006 6:03:19 AM
In the most simple terms assume we have a Composite WebServer control
This Composite Control (CC) is just a "label"
private Label _lblCommissionType;
protected override void CreateChildControls()
{
Controls.Clear();
this._lblCommissionTy... more >>
Personalization Scope?
Posted by William Raymond [MS Project MVP] at 8/8/2006 3:27:30 PM
Hi All,
I am not a programmer, but learning ASP.NET 2.0 to understand the
capabilities and potential limitations for my customers. This is my
disclaimer in case my terminology does not match up with what you would
expect me to be using :-)
From what I can tell, you can Personalize ASP.N... more >>
Adding a second row to a datagriditem?
Posted by Steve Hershoff at 8/7/2006 5:03:55 PM
Hi everyone,
I'm wondering if anyone has a suggestion on how to do this, or if it's even
possible.
In my datagrid's OnItemDataBound function I'd like to somehow "add" a child
row beneath one of the datagriditems (chosen via a QueryString variable) and
use it to hold a secondary datagrid.... more >>
Delete Cookie Control?
Posted by xeroxero at 8/7/2006 1:08:19 PM
What kind of JavaScript is needed to delete all of the cookies for the
current web site, and can that be registered in an ASP.NET page as a
button?
Thanks.
... more >>
User Control Renders On Separate Line
Posted by jdp at 8/4/2006 5:58:59 AM
I've created a user control that I then place in a panel. The reason
it's in a panel is that it's part of search criteria that I hide/show
panels based on the type of search begin done. I can place a label
next to this control in the IDE and it looks fine but when I run the
app, the label is o... more >>
ActiveX .NET cannot update label's Text value?
Posted by dvietha NO[at]SPAM gmail.com at 8/3/2006 6:42:28 PM
Hi All,
I write an ActiveX containing a progress bar and a label by C#. When
running in IE, the progress bar is OK; but I cannot update the value of
label's Text.
Plz explain this problem for me
thanks,
HaDV
... more >>
Viewing Usercontrol Property Changes at Design Time
Posted by jdp at 8/3/2006 10:44:09 AM
I have a usercontrol composed of a label and textbox. I've created a
custom property, LabelText, that I can assign at run time. What I'd
like to see is if I place a value in LabelText in the Property Window
at design time, to see the usercontrol update itself with this value.
How is this acc... more >>
Load ASPX Through AJAX
Posted by MS at 8/3/2006 12:00:00 AM
Hello Everyone
I want to load aspx file through AJAX ( javascript )
I am doing this in ajax it works well but it does not load javascript render
by the controls
how can i do this
Plz.. do help if any one knows
thanks
Sonia
... more >>
Recommended way to add child controls in CreateChildControls
Posted by paul.hester NO[at]SPAM gmail.com at 8/2/2006 10:32:31 PM
Hi all,
What is the recommended way to add child controls *around* existing
child controls in the CreateChildControls method (e.g. table, row and
cell controls for layout purposes)?
Is the best way to keep a reference to the existing child controls,
clear the Controls collection and then re... more >>
ISupportInitialize for ASP.NET?
Posted by breeve at 8/2/2006 3:41:02 PM
From my testing ISupportInitialize is not honored in ASP.NET We have a
control like the following...
<ni:Meter ID="Meter1" runat="server" Range="67, 73" Value="70" >
</ni:Meter>
The Value property checks the range and throws an exception if the range is
outside its value. The defa... more >>
Literal content is not allowed within a CustomControl?
Posted by Dave at 8/2/2006 9:36:01 AM
Is there a way to put content between tags of a custom control so that it
will populate the defaultproperty such as my TabLabel property? When I tried
to put values between the tags I got the error.
I have ParseChildren as ParseChildren(true, "Tabs")] where Tabs are part of
a tab strip I d... more >>
Control missing property after postback with repeater
Posted by dave at 8/1/2006 8:26:01 AM
I am frustrated and not sure where to turn for help.
I have a custom control that has been working fine. The custom control is
composed of a dropdownlist and button. I have placed the control in a
repeater and it works just fine.
I have added a query filter at the top of the page where I... more >>
ControlDesigner.OnPaint
Posted by breeve at 8/1/2006 7:29:02 AM
We have created some dynamic web image controls. At design time we use
System.Web.UI.Design.ControlDesigner.OnPaint to draw our control directly to
the design surface. This saves us from having to create temporary images on
the file system.
The problem is when our controls are placed inside... more >>
|