Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > develop a Web Custom Control

Reply
Thread Tools

develop a Web Custom Control

 
 
Mahesh
Guest
Posts: n/a
 
      09-03-2003

I tried to develop a Web Custom Control and it is shown
below.

Imports System.Web.UI.WebControls
Imports System.Web.UI
Imports System.ComponentModel

Namespace Grid
Public Class MyGrid
Inherits System.Web.UI.WebControls.WebControl

Protected Overrides Sub CreateChildCOntrols()
Dim tempTable As New Table()
Dim x As New TableCell()
Dim x1 As New TableCell()
Dim y As New TableRow()
x.Text = "test1"
x1.Text = "test2"
y.Cells.Add(x)
y.Cells.Add(x1)
tempTable.Rows.Add(y)
tempTable.Attributes.Add("border", "1")
Controls.Add(tempTable)
End Sub

Protected Overrides Sub render(ByVal output As
HtmlTextWriter)
EnsureChildControls()
RenderChildren(output)
End Sub
End Class
End Namespace



It generates a table, with 2 cells in one row.
I have few questions about it. I very much appreciate if
anyone can help me find answers to these questions?

1. How do I change the properties of the table in the
design mode?
2. I want to display my own properties. So, how do I
display "customizedtableheaders" under 'property'? How do
I display 2 sub properties (headertext1 & headertext2)
under "customizedtableheader"?
3. When I enter a string value to the "headertext1"
property in the design mode, I want that value to display
in the first cell in the table as a text in the design
mode. The same has to be done with the "headertext2" and
the second cell in the table. How do I do it?
4. How do make the width and the height of the table
change, by dragging it with the mouse?

Please reply me soon if you know the solutions. Thanks a
lot.


 
Reply With Quote
 
 
 
 
Rajesh.V
Guest
Posts: n/a
 
      09-10-2003
If u have msdn installed in ur system, this link will give u all the answers

ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.1033/dnmag02/html/webc.htm



"Mahesh" <(E-Mail Removed)> wrote in message
news:030201c371fd$a60cb0e0$(E-Mail Removed)...
>
> I tried to develop a Web Custom Control and it is shown
> below.
>
> Imports System.Web.UI.WebControls
> Imports System.Web.UI
> Imports System.ComponentModel
>
> Namespace Grid
> Public Class MyGrid
> Inherits System.Web.UI.WebControls.WebControl
>
> Protected Overrides Sub CreateChildCOntrols()
> Dim tempTable As New Table()
> Dim x As New TableCell()
> Dim x1 As New TableCell()
> Dim y As New TableRow()
> x.Text = "test1"
> x1.Text = "test2"
> y.Cells.Add(x)
> y.Cells.Add(x1)
> tempTable.Rows.Add(y)
> tempTable.Attributes.Add("border", "1")
> Controls.Add(tempTable)
> End Sub
>
> Protected Overrides Sub render(ByVal output As
> HtmlTextWriter)
> EnsureChildControls()
> RenderChildren(output)
> End Sub
> End Class
> End Namespace
>
>
>
> It generates a table, with 2 cells in one row.
> I have few questions about it. I very much appreciate if
> anyone can help me find answers to these questions?
>
> 1. How do I change the properties of the table in the
> design mode?
> 2. I want to display my own properties. So, how do I
> display "customizedtableheaders" under 'property'? How do
> I display 2 sub properties (headertext1 & headertext2)
> under "customizedtableheader"?
> 3. When I enter a string value to the "headertext1"
> property in the design mode, I want that value to display
> in the first cell in the table as a text in the design
> mode. The same has to be done with the "headertext2" and
> the second cell in the table. How do I do it?
> 4. How do make the width and the height of the table
> change, by dragging it with the mouse?
>
> Please reply me soon if you know the solutions. Thanks a
> lot.
>
>



 
Reply With Quote
 
 
 
 
Mahesh
Guest
Posts: n/a
 
      09-11-2003
Idont have MSDN on my computer to check the help page that
you have sent me. i very much appriceate if you can send
me the part that i need in a zip file or in a word
document or you can send me the internet path in
msdn.microsoft.com to go to that help page.thank you very
much for your help

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Develop a PERL WEB SERVICE that utilizes the Yahoo Web ServicesAPI seef gordon Perl Misc 14 03-02-2009 11:04 PM
Web user control - custom web control - java script. Leyla ASP .Net Web Controls 0 05-01-2006 10:05 PM
Capturing event from other custom control within another custom control Jonah Olsson ASP .Net 1 04-05-2005 01:39 PM
AspNetHostingPermission trouble - How do you develop custom controls? news.microsoft.com ASP .Net Web Controls 0 05-24-2004 07:28 AM
ControlDesigner not invoked on custom control when control is rendered within another custom control Matt Sokol ASP .Net Building Controls 2 08-07-2003 07:13 AM



Advertisments