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.
--
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
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
> 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.