Ask a Question related to ASP.NET Building Controls, Design and Development.
-
Omid #1
Accessing properties in custom control
Hi all,
This is probably a newbie question, but...
I have a custom control inherited from System.Web.UI.WebControls.Table. Here
is the code:
Namespace Test
Public Class PageHeader
`Inherits System.Web.UI.WebControls.Table
Protected Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim tblRow1 As New System.Web.UI.WebControls.TableRow
Dim tblRow2 As New System.Web.UI.WebControls.TableRow
Dim tblRow1Cell1 As New System.Web.UI.WebControls.TableCell
Dim tblRow1Cell2 As New System.Web.UI.WebControls.TableCell
Dim tblRow2Cell1 As New System.Web.UI.WebControls.TableCell
Dim tblRow2Cell2 As New System.Web.UI.WebControls.TableCell
tblRow1Cell1.Controls.Add(New System.Web.UI.LiteralControl("<img
src=/help.gif></img>"))
tblRow1.Cells.Add(tblRow1Cell1)
tblRow1.Cells.Add(tblRow1Cell2)
MyBase.Rows.Add(tblRow1)
End Sub
End Class
End Namespace
When I put <test:pageheader> on my page the table appears, but the border
width is zero. I've tried to change it by calling
"MyBase.BorderWidth.Pixel(1)" but it's not working. Also
"MyBase.Attributes("border")=1". So my question is, PageHeader is derived
from Table web control, so how can I change the border width, cell padding,
border color, ...?
Thanks in advance,
Omid
Omid Guest
-
Making Custom Control Properties Visible in Visual Studio's Properties Palette
I am learning how to use the System.ComponentModel class in VB.NET so that I can add my ASP.NET controls to Visual Studio .NET 2003. I have managed... -
Building a non-databound custom template and accessing it's properties
Hello, I've built a custom control (inherits from WebControls.Repeater) with a custom template. The intention is to make a custom paging... -
User Control - Accessing Properties from the Container Page
Dear all, Please check my problem - Problem: I have created a User Control(UC1) for navigating between pages. There are 4 buttons on the user... -
Accessing custom control properties
Hello, I've created a custom control and want to set properties in the aspx page. <%@ Page language="c#" Codebehind="test_control2.aspx.cs"... -
Accessing TreeView Control properties on the client side
Hi , I want to disable (AutoPostBack) for the tree . So on the click event I am able to retrieve the index of the node clicked on the client...



Reply With Quote

