Archived Months
June 2003
July 2003
August 2003
September 2003
October 2003
November 2003
December 2003
January 2004
February 2004
March 2004
April 2004
May 2004
June 2004
July 2004
August 2004
September 2004
October 2004
November 2004
December 2004
January 2005
February 2005
March 2005
April 2005
May 2005
June 2005
July 2005
August 2005
September 2005
October 2005
November 2005
December 2005
January 2006
February 2006
March 2006
April 2006
May 2006
June 2006
July 2006
August 2006
September 2006
October 2006
November 2006
December 2006
January 2007
February 2007
March 2007
April 2007
May 2007
June 2007
July 2007
August 2007
September 2007
October 2007
November 2007
December 2007
January 2008
February 2008
March 2008
April 2008
all groups > asp.net webcontrols > february 2006

Filter by week: 1 2 3 4

Avoiding & when adding a JavaScript event handler using Attributes.Add()
Posted by Nathan Sokalski at 2/28/2006 5:26:25 PM
I add a JavaScript event handler to some of my Webcontrols using the Attributes.Add() method as follows: Dim jscode as String = "return (event.keyCode>=65&&event.keyCode<=90);" TextBox2.Attributes.Add("onKeyPress", jscode) You will notice that jscode contains the JavaScript Logical And ...more >>


Login control with other control
Posted by wei at 2/28/2006 2:51:28 PM
Hello All I want to add RadioBox control or DropDownList control to my login page, so the user can choose which database they want to use, but after I added RadioBox control, It shows me the name" xxx" does not exist in the current context. below is code protected void Login_Authenticate(ob...more >>

Nested Datagrid spanning columns of Parent Datagrid
Posted by Erik at 2/28/2006 7:35:28 AM
Good Morning, I am trying to write a report which will have a nested datagrid spanning the columns of the previous line (1st line is the equipment detail information, 2nd line are the user-entered notes for the equipment). When the user notes are nested in the parent datagrid as a template c...more >>

Dependent Dropdownlists
Posted by sanderscp at 2/28/2006 5:25:26 AM
I know this topic has probably been talked about to death...however I'm having a problem with my dependent dropdownlists in the edittemplates within a detailsview. I am trying to databind my dropdownlists once the selected index has changed of the first dropdownlist has changed. The update o...more >>

Color gradient background in menu control
Posted by larry at 2/28/2006 4:46:10 AM
Hi, I was able to set the background of the static items in a menu control using a color gradient as per the code below. However, whenever the dynamic menu comes up and goes away so does the color gradient background. Does anyone know of any way to avoid losing the color gradient background? T...more >>

Error with Treeview control, which will not load data from it's datasource!
Posted by John Fang at 2/27/2006 6:15:48 PM
I have 2 aspx pages that uses the treeview control. Both pages load the treeview control from dynamically genrated xml. Once I loaded one of these pages and then move to the move to the other page. The second page's treeview control will be loaded with the data from the first page. I've st...more >>

Using the && operator in generated JavaScript
Posted by Nathan Sokalski at 2/27/2006 5:42:42 PM
I have a VB.NET function that I am using in an ASP.NET page. The code creates a String, which contains && (the JavaScript Logical AND operator) and is used as part of the JavaScript sent to the browser. However, ASP.NET is converting this to &amp; even though it is intended to be part of the ...more >>

How to indent a dropdownlist
Posted by Neel at 2/27/2006 2:16:40 PM
Hi How do we indent the data in the dropdownlist? Thanks -Avijit ...more >>



Question from and .Net newbie
Posted by Rob 'Spike' Stevens at 2/27/2006 1:05:27 PM
I have started a job recently. I am primarily a ASP and VB6 developer, but some of the code I will have to deal with is Vb.Net and ASP.Net. While I have been able to figure out a lot of things on modifying the code from MSDN, I occasionally run into issues where I canot find an answer eaisly ...more >>

Accessing the value in a bound control from VB
Posted by Derek at 2/27/2006 4:29:32 AM
I want to make a button visible/invisible depending on who is logged in. I am getting the user name from System.Environment.UserName and then refreshing a SQLDataSource which uses the login name as a parameter to return the permissions for the user. I can display the value in a details v...more >>

autoscrolling in .net
Posted by AVL at 2/27/2006 3:40:27 AM
Hi, I've a requirement in which I need to implement autoscrolling.... Is there any control in .net which supports this functionality/............ My display list(data) should be scrolling ..............more >>

how to bind dropdownlist selectedvalue to custom type
Posted by Trapulo at 2/27/2006 12:00:00 AM
Hello, I have a detailsView that contains a dropdownlist. The ddl loads data from an objectdatasource, as the detailsView makes (with an other datasource, of course). I need to bind the selected item of my ddl to a property of the object binded to the main detailsView. My main object has...more >>

Datagrid en font resize
Posted by Palli at 2/27/2006 12:00:00 AM
Hi I have a javascript to resize font on my page. On one page I have a datagrid but the elements inside dont resize when I click the resize button? Isn't it possible to resize font inside a datagrid??? it works for repeater?? palli ...more >>

The 'SelectedValue' property cannot be set declaratively.
Posted by Steven Livingstone at 2/27/2006 12:00:00 AM
I have seen too many recent examples using the following syntax to expect they are all wrong so i am wondering whether something odd is happening (or i really am missing something). I have this : <asp:DropDownList ID="abc" runat="server" SelectedValue="1"> <asp:ListItem Valu...more >>

TreeView RootNode
Posted by Alessandro Pinto at 2/26/2006 10:37:27 AM
Hi, in the treeview aspnet 2.0 I am using, I would like not to show the root node. Is there a way to have the tree displayed starting from the second level nodes ? thanks Alessandro Pinto...more >>

Conversion from HtmlTextWriterStyle to it's corresponding HTML string
Posted by mehdi_mousavi at 2/26/2006 1:42:29 AM
Hi, How am I supposed to convert an HtmlTextWriterStyle attribute to its corresponding html string? In other words, how am I supposed to get the "background-color" string from HtmlTextWriterStyle.BackgroundColor? Any help would be highly appreciated, Cheers, Mehdi ...more >>

Small spacer pixel inserted in ASP.NET menu control? How to remove?
Posted by Jack at 2/26/2006 12:00:00 AM
Hello, I've created a simple horizontal menu using Web.sitemap using the ASP.NET 2.0 menu control. It works, but it seems to insert a small visible pixel-spacer immediately above the menu whenever I apply a 'border-style:' property to the CSS. Looking at the source code, I can see that the ...more >>

Value for Composite control cannot be retrieved
Posted by Jaime Stuardo at 2/25/2006 4:32:39 PM
Hi all.. I have programmed a composite control that is compound by one TextBox and one ImageButton. This is intended to be a popup calendar. All works well, except when the value is retrieved. For example, I placed that control inside a FormView control that is databound. When the page i...more >>

Command button won't cause postback
Posted by JAdrianB at 2/25/2006 8:05:27 AM
I've created a user control (C#) and added it to a web form. The user control has a command button. When the button is clicked, nothing happens. I thought maybe something went wrong with the control, so I recreated it from scratch. Same problem. If I replace the command button with a link...more >>

Animated buttons control?
Posted by Ben Fidge at 2/24/2006 7:39:06 PM
Can anyone recommend any good controls to implement animated buttons. I want something that can perform the following: - Must initially display a static image - When clicked the button must seamlessly display an animated GIF while waiting for the postback to return The idea is to provide ...more >>

newrow ID with detailsview and objectdatasource
Posted by Trapulo at 2/24/2006 6:58:27 PM
I've a problem inserting a new row using a detailsview and an objectdatasource. I've defined the objectDatasource and it is using well a custom object to insert the new item on db. All works fine, but now I need to get the ID of the inserted row (the ID is an autoincrement value assigned by...more >>

Using Validators as field labels
Posted by Chris Davoli at 2/24/2006 2:44:27 PM
Can I use Validators as field labels AND as error fields. As an example I've got a field (label) named "Formula:". I want to use a validator instead of a label for the label of the field. So I put "Formula:" in the text field of the validator and also put "Formula:" in the error messsage, so t...more >>

Help: Resorting a Gridview/DataSet, Hiding a column in a Gridview with custom data source.
Posted by Egil Hansen at 2/24/2006 5:41:56 AM
Hello I'm building a simple search interface for my company's active directory. After getting the data from the AD, I put it in a DataSet, add all my columns and the the rows. The DirectorySearcher class supports sorting, so I even got sorting to work (even, because this is my first asp.net e...more >>

DropDownList and Spaces
Posted by Mariela Donkova at 2/23/2006 5:13:32 PM
Hi everyone , I have a simple question : How to display in a dropdownlist names which have spaces at the begining. for example : MainCategory subcategory subsubcategory subsubsubcategory I am trying to keep hierarchy using spaces in dropdownlist Regards, Mariela ...more >>

GridView DataFormatString only works on Integers
Posted by Bill H at 2/23/2006 4:54:02 PM
Hello, I'm trying to use the DataFormatString on a GridView Column to format a char(10) phone field to (xxx)xxx-xxxx This works if the field is defined as an integer, but does not otherwise. Is there another trick to using this Property ? thanks Bill ...more >>

GridView and XmlDataSource
Posted by Ben Schumacher at 2/23/2006 3:38:42 PM
Using an XmlDataSource to populate the GridView control, I can't set the DataField property of my BoundField controls to read actual xml node values. It only works if the DataField reads an xml node attribute. This is ridiculous. How can I read actual node values? I have a GridView contro...more >>

Can I read the relevant CSS class?
Posted by Paul Cheetham at 2/23/2006 11:17:56 AM
Hi, I have a datagrid, where I have used CSS classes for the item style and alternating item style. The grid draws great when I load the page, but I have problems when I want to select a line by clicking on it. When a row is clicked on, I set the backcolor of that row in order to show i...more >>

Trouble with DataList Control
Posted by Robert Sheppard at 2/23/2006 8:34:31 AM
I have multiple DataList controls on the same page and I want to bind each of them to different datasets. Is this possible? I am currently using the following syntax to bind my first dataset. private void Page_Load(object sender, System.EventArgs e) { if (!Page.IsPostBack) { ...more >>

Trouble with the DataList Control
Posted by Robert Sheppard at 2/23/2006 8:32:44 AM
I have multiple DataList controls on the same page and I want to bind each of them to different datasets. Is this possible? I am currently using the following syntax to bind my first dataset. private void Page_Load(object sender, System.EventArgs e) { if (!Page.IsPostBack) { ...more >>

ReportViewer Question
Posted by Phil Barber at 2/23/2006 8:23:56 AM
Does anybody know why the Print button on the report viewer toolbar (VS2005) only shows for remote reports and not Local? Is there a way to get a print function(button) on the toolbar for local if not what is required to get the remote reports setup and working? reports? thanks Phil B ...more >>

TabStrip - create tabs dynamicly on client-side
Posted by Daniel Granatshtein at 2/23/2006 1:10:11 AM
I have created Tab and PaveView on the client side, but i am having a problem getting the new tab on the server-side. I understand I can use the viewstate and events but I have no clue how to do it. If someone can send me an example on how it's done it would be a great help. I add the script...more >>

Datagrid, perplexed
Posted by Zamdrist at 2/22/2006 7:54:26 PM
Somehow, I managed to screw up my datagrid so that when I click the hyperlink Edit column...nothing happens other than the page 'reloading' or refreshing...I can't for the life of me figure out what I did last that may have screwed it up. I even went so far as to remove the last sections of code...more >>

hyperlink in a Calendar Control
Posted by Tina at 2/22/2006 5:59:00 PM
This does not work... Private Sub calWO_DayRender(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DayRenderEventArgs) Handles calWO.DayRender If e.Day.Date.Day = 18 Then Dim myControl As New LiteralControl("<a href='http://www.google.com'></a>") e...more >>

ASP.Net 2.0 Table not expanding 100%
Posted by Chuck Snyder at 2/22/2006 3:33:27 PM
I'm trying to get a table to expand to fill the top of the page. But its leaving a margin on all sides (at least top, left and right). Can anyone see what I'm doing wrong??? <body> <form id="form1" runat="server" style="left: 0px; position: absolute; top: 0px; padding:0,0,0,0;"> ...more >>

ASP.NET 2.0 Easier than ASP? Gimmie a Break!
Posted by dm1608 at 2/22/2006 1:46:51 PM
I know all the hype right now from Microsoft is how much easier, faster, and less code ASP.NET 2.0 provides over previous versions. I'm puzzled by this as I could turn out an classic ASP webpage in a few hours to query a database, display a grid/table, and not have much to worry about. Doin...more >>

.NET 2.0 ImageButton control not submitting like form button
Posted by Aaron Scholl at 2/22/2006 1:45:27 PM
I am trying to use an image button as my submit button. It fires the click event properly and it does all of my processing, but when it is done it does not clear the form like a form submit would normally do. All I can find is that the imagebutton control for 2.0 should have a UseSubmitBeh...more >>

checking checkboxes per javascript in asp.net 2.0 treeview
Posted by Tony at 2/22/2006 12:59:40 PM
hi, I'm using the treeview webcontrol from asp.net 2.0. Is it possible to use a client script that automatically checks or unchecks all childnode checkboxes under one childenodes' checkbox which checked state is changed by the user. thanks, Tony ...more >>

Wizard + control validation
Posted by Mark at 2/22/2006 12:51:18 PM
Hi, I have a web form that contains a Wizard. One of the wizard steps includes a number of textboxes each linked to a RequiredFieldValidator. The form also has a Button that I can click to perform a postcode lookup. When I enter a postcode in one of the textboxes and click the Button to ...more >>

Embedding ReportViewer in a Web Part
Posted by Terry Smith at 2/22/2006 11:36:05 AM
When I embed the Report Viewer control in a web part I only get the toolbar displayed. The web part will not auto-size to display the report itself, and I have not been able to force it to size correctly. My "web part" is a user control within a Web Part Zone in the ASP.NET 2.0 framework, not ...more >>

Compare Validator for Date AND Time
Posted by Chris Davoli at 2/22/2006 8:04:28 AM
I am using the CompareValidator to be sure that the date is valid. I do a DataTypeCheck with a Type of Date on the ControlToValidate. This works good if I have just date in the Date Field, but I have Date and Time. Is there any way to use a validator on client side to validate a field containi...more >>

WebPartManager is Undefined
Posted by Prashant Majhwar at 2/22/2006 12:00:00 AM
I have created sample web Application. On the default page I drop webpartmanager control and then create a table and place webpartzones. Now when i am running it in development mode ...everything runs fine. But when i publish the website and try to run....error pops up Webpartmanager is undefine...more >>

asp wizard
Posted by Geert at 2/22/2006 12:00:00 AM
Hello, I like to change the text of the navigation buttons of an asp wizard control dynamically. It is possible to change the text with the wizard.stepNextButtonText property. But I am using a stepnavigation template wherein I create my own button. Somehow i can't find my button so I can't c...more >>

how to create graphs in ASP?
Posted by Cimento Cola at 2/21/2006 4:20:00 PM
Hello everyone! Can anybodu point me to some sites about builting graphs in ASP? I´m trying to build pie and/or bar graphs like the ones in http://www.hanengcharts.com/Chart_Gallery.asp They use a .class I´ve downloaded and tested it and it works great, but one has to pay to have it... Does...more >>

Parsing HTML in Controls
Posted by Nick at 2/21/2006 1:51:28 PM
Hello, I have a task to translate HTML text from a database to a legacy proprietary format none html. For this I was hoping to load the HTML into object model where each HTML table or div or span tag is an object from which I can read the attributes and generate the proprietary output. I t...more >>

Dynamic Textboxes.
Posted by Shawn at 2/21/2006 1:34:04 PM
I have a webpage that uses a drop down box of numbers to dynamically generate a number of textboxes that are added to a panel control. It works fine until a postback. Then they all dissappear. I have set the EnableViewState to true, but it still happens. Any ideas? Protected Sub btnNumInGro...more >>

ASP.NET 2.0 and ObjectDataBinding
Posted by dm1608 at 2/21/2006 12:58:32 PM
I'm doing an ASP.NET 2.0 project where I have a BAL and DAL layer. I'm passing a DataSet from the DAL to the BAL. The BAL is passing generics back to the presentation. All works fine, however, I noticed a problem with my code that does something like this in the BAL: List<JobSummary> j...more >>

SkinIDTypeConverter in DesignerActionList
Posted by auspicious NO[at]SPAM gmail.com at 2/21/2006 11:05:47 AM
We have several custom WebPartDesigner's implemented for various WebParts in ASP.NET 2.0. One of the properties exposed on the DesginerActionList of the WebPartDesigner is a SkinID that's currently a free-text field. We've tried (unsuccessfully) to reproduce the same dropdown that appears in the...more >>

TreeView web control not displaying
Posted by Hass at 2/21/2006 11:05:07 AM
Hi, I have developed a ASP.NET application that uses the treeview web control. The application works fine on most machines but on a random few the control fails to display at all. All I get is an empty frame. I have checked all the browser settings and they are exactly the same. Does anyone k...more >>

Datagrid viewstate
Posted by Larry Charlton at 2/21/2006 4:47:30 AM
Is there a way to selectively turn off viewstate for a datagrid? I've implemented server side paging for the grid with an object datasource, and there's no reason to track the actual data in the grid in viewstate, but I still need to track the page and sort order....more >>

Type.GetType()
Posted by Andrew Chalk at 2/20/2006 11:32:21 PM
After the following line: Type myType1 = Type.GetType("System.Drawing.Color"); myType1 is "undefined". Why is this? I expected it to be type System.Drawing.Color. Many thanks. ...more >>


DevelopmentNow Blog