all groups > asp.net building controls > april 2005
Filter by week: 1 2 3 4 5
Javascript and ServerControl
Posted by CalvinKash at 4/30/2005 10:37:01 AM
Hi,
I'm trying to add Server controls on the JavaScript side, I'm using the
following syntax:
var oText = document.createElement("asp:Label");
div.appendChild(oText);
that works when I use html controls, but doens't work with ASP controls, any
idea why?
... more >>
Collection disappearing at run time
Posted by lisa NO[at]SPAM starways.net at 4/29/2005 2:43:08 PM
I really, really wanted to finish this one without asking anyone for
help. But I've been beating my head against this thing, and I'm
getting nowhere.
I wrote a tab control. I cribbed some ideas from the BlueValley one,
but mostly after I'd finished the main stuff.
It works just great in d... more >>
Handle Event of Dynamically Added User Control
Posted by Jon B at 4/29/2005 12:00:00 AM
Hi There!
How to handle the events of a dynamically added user control?
e.g. I have following code...
Dim myUserControl as Object = LoadControl("myFirstControl.ascx")
myFirstControl fires LinkClicked event and I don't know how to handle that
LinkClicked event from containing page.
P... more >>
Closing a window using a ASP:ImageButton
Posted by thechaosengine at 4/28/2005 2:57:26 AM
Hi all,
I need to be able to cause the following chain of events after clicking an
asp:button but I don't know how to do it. I'd really appreciate any advice
on this or alternative approaches:
The window in question is a popup asking the user to provide some details.
The primary window i... more >>
Do we always have to use the HtmlTextWriter to create the control?
Posted by msnews.microsoft.com at 4/27/2005 2:22:07 PM
Hello Everybody,
Do we always have to use the HtmlTextWriter to create the control?
Can we not use the overriden CreateChildControl to create the control?
Is there any samples available?
Thanks
Anand
... more >>
registerclientscriptblock error
Posted by wardy1975 NO[at]SPAM yahoo.com at 4/27/2005 6:41:21 AM
I'm currently trying to register a block of javascript on a custom web
control using the Page.RegisterClientScriptBlock functionality. I am
trying to include the "<!--" in the javascript block to hide it as
required by XHTML standards, but when I add these characters and
attempt to register the... more >>
custom control onblur postback
Posted by neil S via DotNetMonster.com at 4/27/2005 12:00:00 AM
I have a custom control with a textbox and dropdown list. The dropdown
list is hidden and acts as a data source for the textbox. When the user
enters text in the textbox, an onKeyup event is fired and retrieves the
first value from the dropdown list equal to that entered, and fills the
text bo... more >>
Custom controls that contain other controls
Posted by lisa NO[at]SPAM starways.net at 4/26/2005 1:15:32 PM
Okay... maybe this has been done. I hate the Microsoft Tab and
Multipage controls. So I'm building my own Tabstrip control.
The style and DHTML isn't a problem. In fact, I'll post it at the end
of this for those who'd like it. It's probably IE only, but that's the
environment I'm working i... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
removing item from dropdown list
Posted by Paul at 4/25/2005 7:14:04 PM
Hi just wondering if there is a way to remove an item from a dropdown list in
code after it has been filled with data from a dataset? Also do I need to
know the index of the item I want to remove or is just knowing the string
value sufficient?
thanks.
--
Paul G
Software engineer.... more >>
Only one instance of my control per Page
Posted by Zarko Gajic at 4/25/2005 12:00:00 AM
Hi, what's the best practice of ensuring that only one instance of a
(custom) control can be placed on a Web form (either at design or run time)?
~ Zarko
... more >>
Using controls in datagrid cells
Posted by et at 4/24/2005 11:15:50 AM
How can I retrieve the Container.DataItem name in a checkbox used in a
template column. During an Update, I can dynamically retrieve the value of
the checkbox, but I need to retrieve the DataItem also.
<asp:TemplateColumn>
<ItemTemplate>
<asp:checkbox id="Checkbox7" runat="server" C... more >>
How to a avoid a *huge* viewstate?
Posted by mortb at 4/22/2005 12:00:00 AM
I'm writing a custom treeview control.
The treeview is a htmltable with the nodes and branches,
The htmltable is located in a div to make it scrollable when it is larger
than a certain pixel size.
All this is nested in my custom control.
My problem is that the viewstate becomes really large wh... more >>
Enabled / Disabled my control
Posted by David at 4/21/2005 4:11:49 PM
Hi,
My Control (inherits from System.Web.UI.Control) has the Enabled property
that enabled a button inside of my control. The problem is that in the page
that has the control has a button ("Edit") to set the Enabled property to
true and when is pressed first load and build the control, and the... more >>
Can't retain state for Control inherted from ListBox
Posted by Don at 4/21/2005 2:31:31 PM
I have created a Web Custom Control that inherits from
WebControls.ListBox but can't get it to retain the selectedIndex after
a postback. As a test I created a very simple version of the control
with no additional code. I just inherited from the exisiting ListBox
class and put the control on a... more >>
Can't get postback handler to install for my control.
Posted by Ken Varn at 4/21/2005 2:23:48 PM
I have a made a custom control that requires postback. The control relies
on the __dopostback() function to be in place in order for it to do the
postback. I actually call this function directly when I need my control to
do a postback using javascript.
In my PageLoad event for the control, I... more >>
Custom Controls Exception handling
Posted by mjcast at 4/21/2005 1:39:06 PM
I am creating a bunch of custom controls that will be used by user to display
Personalized data. The page that will host the controls will contain anywhere
from 6 custom controls to 2 custom control. I want the page to handle all
exceptions coming from the custom controls.
What is the best... more >>
Include images in an assembly.
Posted by Shark Bait at 4/21/2005 1:08:06 PM
Right now I have a web control that serves as a header for all of our
intranet sites. The assembly in in the GAC but it has images (jpg) that are
located in a directory on the server. Is there a way to compile these images
into the assembly?
Thanks... more >>
Adding description to method?
Posted by lisa NO[at]SPAM starways.net at 4/21/2005 8:59:30 AM
In VS.NET, when you hit . and get a list of possible properties and
methods, a tooltip comes up that gives you the footprint of each
method, and often a description of what the method is for.
When I create my own control and add properties and methods, the
tooltip appears the same way. But th... more >>
Limiting number of control instances?
Posted by lisa NO[at]SPAM starways.net at 4/21/2005 8:42:44 AM
Hey all,
Is there a way of limiting the number of instances of a server control
that the user can put on a form?
I'm writing an interfaceless server control, and I want to make it
impossible for the user to put more than one of them on a page.
Is that possible? If so, how?
Thanks,
Li... more >>
webcontrol with embedded javasript in assembly
Posted by md at 4/20/2005 10:13:41 PM
Hello
I've created a webcontrol that uses some javascript. Currently i've embbed
the javascript into the assembly and it's added to the webpage if
necessary..
The disadvantage of this approach is that the client can't cache the script
because it's embedded into the page instead of refere... more >>
Multicolumn combo box
Posted by NEWBIE at 4/20/2005 7:55:02 AM
Hi,
I have to show data in grid like manner in the combobox.
Please give me ne idea to create multicolumn comboBox.
Thanx.
... more >>
Composite control inside datagrid
Posted by Laflak at 4/20/2005 5:05:02 AM
Hi,
I have created a composite control which function "perfectly" in my web page
(Framework1.1).
The problem is:
When I try to use it on a datagrid, I'm not able to set properties
I probabily miss something.
Here is snippet my Control Code:
<DefaultProperty("Value"), ToolboxData("<{0}:Pm... more >>
Setting values of Controls used multiple times on a page
Posted by james.e.coleman NO[at]SPAM gmail.com at 4/20/2005 4:14:41 AM
Hello,
I have created a custom dropdownlist that is used multiple times within
a single page. When trying to set the values of the controls with the
page in which they are being used, they all are set to the value of the
last control. I found this link:
http://www.codecomments.com/archive31... more >>
How do you assign an ID to ListItem?
Posted by Amelyan at 4/19/2005 8:25:08 AM
How can I assign an ID to dynamically generation ListItem that I add to
dynamically generated CheckBoxList or RadioButtonList? I need to identify
the specific ListItem later through Request.Form when user sends back data.
... more >>
RegisterStartupScript firing at the wrong time
Posted by lisa NO[at]SPAM starways.net at 4/18/2005 1:36:59 PM
I have a weird thing going on. I think I've figured out what's causing
my problem, but I can't find any way to fix it.
I have a custom server control that wraps a <select> in a <div> in
order to emulate a WinForms listbox. It works nicely.
I have another custom server control that includes... more >>
Has anybody seen a visual tool for creating custom controls?
Posted by JohnH. at 4/18/2005 1:15:08 PM
Hi all,
I need to create custom control ASP.Net, a composite control with about
a dozen standard child controls. It looks like I'm going to have to
hand code the creation and positioning of all the child controls. Has
anybody sees a visual tool for laying out child controls in a custom
cont... more >>
Beginner Looking For Help
Posted by cmay at 4/18/2005 12:12:01 PM
I am looking for some help with this problem I am experiencing.
What I want to do, is extend the dataset, but include a button above it that
I can click, and handle the postback of that click w/ in my custom server
control code.
So, my class inherits from the dataset, and has a button defi... more >>
Error executing child request for error.aspx
Posted by Shridhar at 4/18/2005 1:12:01 AM
We are getting errror when load control is added(ascx) as "Error executing
child request for error.aspx"
it thows an error after calling the following statement:
base.OnInit(e);
Thanks for any clue.
Shridhar... more >>
IHttpHandler and VS design-time
Posted by Zarko Gajic at 4/18/2005 12:00:00 AM
Hi,
I've developed a custom handler for my custom control that stores and serves
all the JS and GIF files to the control user at run time.
Question: how do I force the images to appear on the control (as those are
child controls to this composite control) at design time in VS's designer?
... more >>
notes, trust deeds and mortgages
Posted by Michael Lescault at 4/14/2005 8:49:21 AM
Hello
My name is Michael Lescault; I buy notes, trust deeds and mortgages
I was hoping you would be able to help me find some people or a list of mortgagees that may want to sell there notes, trust deeds or mortgages.
Thank you for your help
Michael Lescault
401-475-3280
mlescault91967@aol.c... more >>
Image control not working
Posted by Venkatesh.Bhupathi at 4/13/2005 10:37:01 PM
I have a user control inside a aspx page and i have event handler inside the
user control for the ImageClick EVent. But when i am trying to instantiate
the event in the .aspx page load event it is throwing object reference set to
null. Please find the sample code attached i have done please ch... more >>
Urgent! GridView and templated controls binding. Plz help
Posted by Shafia at 4/13/2005 2:52:16 PM
Hi,
My GridView has templated controls in it and I'm binding to an
ObjectDataSource. The problem is it refused to bind to my grid column
"ColumnName" which is also an UpdateCommand Parameter for the
ObjectDataSource. It displays the following error
"DataBinding: 'System.String' does not conta... more >>
East Central Florida training
Posted by FloridaJoe at 4/13/2005 9:53:55 AM
I cannot find a group better devoted to this question.
Can anyone recommend a source for training in ASP NET in the east / central
florida area. I'm looking for an evening course in college or university or
a reasonably priced private school. The only courses I can find in Orlando
are 5 day cl... more >>
Including Java Scripts in Server controls
Posted by Sundararajan at 4/12/2005 2:37:02 AM
Dear Folks,
I am developing a server control as a composite control. I need to
associate some javascripts with the individual controls of the composite
control.
I have the javascrips in a separate .js file. how can i associate the
functions in .js file with the server controls.
Th... more >>
Setting default values to datagrid headerstyle
Posted by Joey Lee at 4/12/2005 12:00:00 AM
Hi,
How do one set default value for objects?
For simple attributes like string, one can do it like
[Bindable(true),
Category("Appearance"),
DefaultValue("datagridstyle")]
public override string CssClass
{
get
{
return base.CssClass;
}
set
{
base.Cs... more >>
Server PUSH to client
Posted by PBS at 4/11/2005 8:41:49 AM
We have an internal asp.net application for orders/manufacturing
information. Presently we have set the META Refresh tag on the affected
pages set to "120" so the client browsers refresh every two minutes so
displayed data is "current". This has several drawbacks, including the
annoyance o... more >>
Transform html to code
Posted by Steve at 4/10/2005 9:15:02 AM
Is there a class that will assist with taking existing aspx markup from a
file and creating a sort of tree structure that will allow you to transform
the html layout to code?
Example aspx code:
<asp:Table runat=server>
<asp:TableRow>
<asp:TableCell>
<asp:Label id=mylabel>test</asp:La... more >>
Accessing path in a custom designer
Posted by Dale Preston at 4/10/2005 8:57:56 AM
I am creating a custom web control with a custom property editor. The
custom editor is for setting a relative URL property of an item in a
collection property of the control. Because the property is a collection,
the UrlEditor will not work because of a known (even if not confessed) bug
in all... more >>
Setting the order of LoadViewState
Posted by lisa NO[at]SPAM starways.net at 4/8/2005 12:43:33 PM
I have a server control. It has a Layout property, a Height property,
and a Width property. What happens in the Height and Width property
depends on the Layout.
Unfortunately, what seems to be happening is that when I run a page
that has my control in it, the Height and Width properties are
... more >>
Set the width of a custom control with 2 controls inside
Posted by Fernando Lopes at 4/7/2005 2:18:34 PM
Hi there.
I'm developing a custom controls.
Inside this custom control, I want to put 2 controls: one textbox and one
dropdownlist.
I want to create a Width property for this custom control.
The dropdownlist shoul have 50px.
The textbox must have variable width;
So, how can I set this prope... more >>
SERVER CONTROL DOESN"T RUN
Posted by Lloyd S at 4/7/2005 10:23:09 AM
I wrote a server control. It does not run because it is looking for the
assembly. I get an error messgage in the page saying:
Parser Error Message: File or assembly name CustomCalendar, or one of its
dependencies, was not found.
Here is the Assembly Load Trace:
=== Pre-bind state info... more >>
Urgent User Control
Posted by Prince Mathew at 4/7/2005 12:00:00 AM
Hi All,
I have a requirement. I am throwing an exception from my user control I want
to catch this in my container page. Is this possible?
I don't want any event to be raised.
PLEASE HELP ME.
Thanks
Prince
... more >>
Server control development
Posted by Sundararajan at 4/6/2005 9:39:02 PM
Dear Folks,
I am developing a Header server control. as we know the header control
is always going to be at the top of the web page. is there any means to
achieve something like, when i drag and drop the Header server control into
my Web Page,
i. It gets itself aligned to the t... more >>
Get Value of a control from my Own Control
Posted by David at 4/6/2005 4:32:21 PM
Hello,
i have this code:
public class MyControl :System.Web.UI.Control, INamingContainer
{
protected override void CreateChildControls()
{
TextBox myTextBox = new TextBox();
myTextBox.ID = "txtMyTextBox";
this.Controls.Add(myTextBox);
}
}
When the p... more >>
Strange error from: Dim myState As Object() = CType(savedState, Object())
Posted by lisa NO[at]SPAM starways.net at 4/6/2005 2:09:14 PM
Every book and every website I've seen that talks about how to save
state for child controls in a composite webcontrol says to do something
like the following. But when I do it, I hit the line:
Dim myState As Object() = CType(savedState, Object())
....and I get this error:
Cannot convert... more >>
Open a web from a server control
Posted by Ahmed Hashish at 4/6/2005 2:01:07 PM
How could I open a modal webform from a server control?
I'm using the render sub and writer object to output script that open a
webform, but it gives error object not found, it tries to open the webform
from the client application directory, how could I enforce it to open the
webform from my ... more >>
Output script
Posted by Ahmed Hashish at 4/6/2005 1:12:16 PM
I have created a server control and overridden the sub Render to output
JavaScript functions, the problem that if the client used two instances of
my control the control generates the JavaScript functions twice which cause
a lot of problems, how could I solve this problem?
Ahmed
... more >>
ViewState
Posted by Mike at 4/6/2005 10:21:18 AM
Hi,
I'm developing a Composite Control that have a <div>, inside a Table, that
can be moved by the user with the limits of the table. What I want, is that
when postback raised the <div> maintain the position seted by the user.
Somebody know how can i do that?
Thanks
... more >>
What's wrong with this custom control?
Posted by Sameeksha at 4/6/2005 1:39:02 AM
I've created the following control and placed it on a web page. When I click
on 'Add' button, it should add a new item to the dropdown list, but that's
not happening. Can anybody tell what's wrong with this code?
public class TryControl : System.Web.UI.WebControls.WebControl
{
protected ... more >>
UserControl and Javasript
Posted by Jay at 4/5/2005 5:41:20 PM
I have been having trouble with using JavaScript in UserControls.
Specifically, the trouble is in using window.open (url). Sometimes the
system will hang. Sometimes the original page, from which I am opening a
new window, will go blank. I have used javascript with asp.net many many
times with... more >>
|