Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Writing new components

1 view
Skip to first unread message

Matjaz Cof

unread,
Feb 1, 2006, 8:40:27 AM2/1/06
to
I want to write new component for aspx.net. Something like
ODBCConection, odbcAdapter, SqlConnection,...
Could you direct me to the correct way?
What I must know? Is there any tutorials?
Thanks

Marco Caspers

unread,
Feb 1, 2006, 11:06:06 AM2/1/06
to
Matjaz Cof wrote:

You want to write a "component" that functions like
ODBCconnection/adapter/sqlAdapter , or do you want your component to
use these things that are already provided by the .NET framework?

If the first, then i ask, why re-invent the wheel? It's all already
provided by Microsoft in the .NET framework, and it works fine.

If the latter, have a look at the asp.net website (C#), or drBob's
(Delphi/C#) there's plenty of .NET and Delphi examples, also there's
several examples in the help files and pdf's that came with Delphi.

Also i'd suggest you get a good book like Creating Microsoft ASP.NET
server controls and components from Microsoft Press.
It's an in depth book that describes the various aspects of developing
components for ASP.NET. All C# of course, but that's not really a
problem because for nearly everything the Delphi equivalent is
identical to the C# ones.

--

Matjaz Cof

unread,
Feb 1, 2006, 12:41:14 PM2/1/06
to
I appologize for defective information about what i want.
Of course i want to write component that use components like odbc,
connection, ...
I want that component can be found in the tool palete and can be drop to
the webForm of my aspx project. I want write some published property and
so on.
My component will not have any visiual things, like button and label
has. (text property). It will be like connections, and other components
that output nothing to html page.
In help, the only thing i get is the pdf file: help.pdf where i found:
Overriding ASP.NET Methods
but this is almost nothing if it is the correct thing.
In demos i also find nothing. I use Borland studio 2006.
Colud you tell me more, where to find this examples, demos...
Thanks

about dr Bob i found something (Writing .NET Components) that he
published in Contents, The Delphi Magazine Issue 122, October 2005.
And that is all i have found.

I also search on google for: delphi writing components for asp.net and
find nothing.

I would be appreciated if you give me more information.
Perhaps only from which class i must inherit. In delphi 7 was TComponent.
Or how to register component that it appeas in tool palette.
Thanks a lot

Matjaz Cof

unread,
Feb 2, 2006, 7:40:33 AM2/2/06
to
I finally found something, but it's not working like i expect.
I write a visual component, but i don't want visiul. I want non-visiual.
My code is:

unit test_package;

interface

uses
System.Web, System.ComponentModel, System.Web.UI;

type
[DefaultProperty('DisplayText')]
SimpleTextControl = class(System.Web.UI.Control)
strict private
FDisplayText: string;
strict protected
procedure Render(Writer: HtmlTextWriter); override;
public
constructor Create;
published
function get_DisplayText: string;
procedure set_DisplayText(const Value: string);
[
DefaultValue(''),
Description('The text that will be displayed in the control.'),
Category('Appearance'),
Bindable(True)
]
property DisplayText: string read get_DisplayText write
set_DisplayText;
end;

implementation

****
****
****

Could someone help me.
Thanks

Marco Caspers

unread,
Feb 3, 2006, 9:40:19 AM2/3/06
to
Matjaz Cof wrote:

> I finally found something, but it's not working like i expect.
> I write a visual component, but i don't want visiul. I want
> non-visiual.

For non visual you need to inherit from a non visual control.

Also in asp.net language you don't speak much of "components", you
speak of controls.
That's why searching for components for asp.net on google doesn't turn
up a lot.

0 new messages