Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx_beginners thread: VS.Net ADO.Net Controls


Message #1 by "jude the obscure" <jude@j...> on Mon, 11 Feb 2002 20:22:45 -0600
This is a multi-part message in MIME format.



------=_NextPart_000_0001_01C1B339.DE096530

Content-Type: text/plain;

	charset="us-ascii"

Content-Transfer-Encoding: 7bit



Though most of my ADO stuff is currently hand-coded, I thought the new

VS.Net(VB) IDE might offer some short cuts worth looking into. My

question:

 

Is it possible to use the VB.Net Data controls in an .aspx project

WITHOUT having to do any manual coding?

 

Stated another way, is some manual coding always required even if one

uses the proper Data controls when doing an .aspx project.

 

The 3-4 books I've bought on .Net programming all (disappointingly) shy

away from talking about putting together an .aspx project from within

the IDE, or if they use the IDE, they still hand-cdoe and avoid the

controls.

 

Thanks!

 

jk

 

(I may duplicate this message in the ADO.Net forum.)






Message #2 by "Curtner, Lynn" <lynn.curtner@p...> on Tue, 12 Feb 2002 08:11:43 -0600

Yeah, what do these old-timer asp guys have against the IDE?  Everyone seems 

so proud of being able to do everything in Notepad.  For me, using the IDE seems

like the only sensible course of action...



> ----------

> From: 	jude the obscure[SMTP:jude@j...]

> Reply To: 	aspx_beginners

> Sent: 	Monday, February 11, 2002 8:22 PM

> To: 	aspx_beginners

> Subject: 	[aspx_beginners] VS.Net ADO.Net Controls

> 

> Though most of my ADO stuff is currently hand-coded, I thought the new VS.Net(VB) IDE might offer some short cuts worth looking
into. My question:

>  

> Is it possible to use the VB.Net Data controls in an .aspx project WITHOUT having to do any manual coding?

>  

> Stated another way, is some manual coding always required even if one uses the proper Data controls when doing an .aspx
project.

>  

> The 3-4 books I've bought on .Net programming all (disappointingly) shy away from talking about putting together an .aspx
project from within the IDE, or if they use the IDE, they still hand-cdoe and avoid the controls.

>  

> Thanks!

>  

> jk

>  

> (I may duplicate this message in the ADO.Net forum.)




> 

Message #3 by "Kyle" <Kyle@T...> on Tue, 12 Feb 2002 13:05:01 -0500
The IDE is great but it has limitations for code generation.  I use the

IDE as much as possible but when wanting to customize the code it is

often necessary to move it out of the Windows Form Designer area so once

it is customized it won't be overwrite by the designer.  There are some

programs that can't be written with designer generated code.  At that

point I'm hand coding but I still like the IDE as my editor.  More than

being against the IDE and proud of notepad, I think it's a matter of

being proud of understanding the code. 



_____________________________________________



Kyle Dunn

Chief Information Officer

Funeral Services, Inc.

xxx-xxx-xxxx  x 309

Kyle@F...



-----Original Message-----

From: Curtner, Lynn [mailto:lynn.curtner@p...]

Sent: Tuesday, February 12, 2002 9:12 AM

To: aspx_beginners

Subject: [aspx_beginners] RE: VS.Net ADO.Net Controls





Yeah, what do these old-timer asp guys have against the IDE?  Everyone

seems

so proud of being able to do everything in Notepad.  For me, using the

IDE seems

like the only sensible course of action...



> ----------

> From: 	jude the obscure[SMTP:jude@j...]

> Reply To: 	aspx_beginners

> Sent: 	Monday, February 11, 2002 8:22 PM

> To: 	aspx_beginners

> Subject: 	[aspx_beginners] VS.Net ADO.Net Controls

>

> Though most of my ADO stuff is currently hand-coded, I thought the new

VS.Net(VB) IDE might offer some short cuts worth looking into. My

question:

> 

> Is it possible to use the VB.Net Data controls in an .aspx project

WITHOUT having to do any manual coding?

> 

> Stated another way, is some manual coding always required even if one

uses the proper Data controls when doing an .aspx project.

> 

> The 3-4 books I've bought on .Net programming all (disappointingly)

shy away from talking about putting together an .aspx project from

within the IDE, or if they use the IDE, they still hand-cdoe and avoid

the controls.

> 

> Thanks!

> 

> jk

> 

> (I may duplicate this message in the ADO.Net forum.)




$subst('Email.Unsub').

>






$subst('Email.Unsub').

Message #4 by "Curtner, Lynn" <lynn.curtner@p...> on Tue, 12 Feb 2002 12:42:33 -0600

Kyle,



You're right.  My apologies...



> ----------

> From: 	Kyle[SMTP:Kyle@T...]

> Reply To: 	aspx_beginners

> Sent: 	Tuesday, February 12, 2002 12:05 PM

> To: 	aspx_beginners

> Subject: 	[aspx_beginners] RE: VS.Net ADO.Net Controls

> 

> The IDE is great but it has limitations for code generation.  I use the

> IDE as much as possible but when wanting to customize the code it is

> often necessary to move it out of the Windows Form Designer area so once

> it is customized it won't be overwrite by the designer.  There are some

> programs that can't be written with designer generated code.  At that

> point I'm hand coding but I still like the IDE as my editor.  More than

> being against the IDE and proud of notepad, I think it's a matter of

> being proud of understanding the code.  

> 

> _____________________________________________

>  

> Kyle Dunn

> Chief Information Officer

> Funeral Services, Inc.

> xxx-xxx-xxxx  x 309

> Kyle@F...

> 

> -----Original Message-----

> From: Curtner, Lynn [mailto:lynn.curtner@p...] 

> Sent: Tuesday, February 12, 2002 9:12 AM

> To: aspx_beginners

> Subject: [aspx_beginners] RE: VS.Net ADO.Net Controls

> 

> 

> Yeah, what do these old-timer asp guys have against the IDE?  Everyone

> seems 

> so proud of being able to do everything in Notepad.  For me, using the

> IDE seems

> like the only sensible course of action...

> 

> > ----------

> > From: 	jude the obscure[SMTP:jude@j...]

> > Reply To: 	aspx_beginners

> > Sent: 	Monday, February 11, 2002 8:22 PM

> > To: 	aspx_beginners

> > Subject: 	[aspx_beginners] VS.Net ADO.Net Controls

> > 

> > Though most of my ADO stuff is currently hand-coded, I thought the new

> VS.Net(VB) IDE might offer some short cuts worth looking into. My

> question:

> >  

> > Is it possible to use the VB.Net Data controls in an .aspx project

> WITHOUT having to do any manual coding?

> >  

> > Stated another way, is some manual coding always required even if one

> uses the proper Data controls when doing an .aspx project.

> >  

> > The 3-4 books I've bought on .Net programming all (disappointingly)

> shy away from talking about putting together an .aspx project from

> within the IDE, or if they use the IDE, they still hand-cdoe and avoid

> the controls.

> >  

> > Thanks!

> >  

> > jk

> >  

> > (I may duplicate this message in the ADO.Net forum.)




> $subst('Email.Unsub'). 

> > 

> 




> $subst('Email.Unsub').

> 




> 

Message #5 by mbreeve@r... on Wed, 13 Feb 2002 10:51:09
Kyle:



I got to the stage you mention, i.e. I need to use the IDE for editing and 

building, but I don't want to let the designer overwrite my recently hand-

edited HTML and Javascript code (which I did originally get from the 

designer). Unfortunately, this does keep happening.



What do you mean by "move it out the Windows Form Designer area"? I expect 

there is some VS.NET menu selection, or something like that, just staring 

me in the face. At the moment, I just can't see it...

> 

> > ----------

> > From: 	Kyle[SMTP:Kyle@T...]

> > Reply To: 	aspx_beginners

> > Sent: 	Tuesday, February 12, 2002 12:05 PM

> > To: 	aspx_beginners

> > Subject: 	[aspx_beginners] RE: VS.Net ADO.Net Controls

> > 

> > The IDE is great but it has limitations for code generation.  I use the

> > IDE as much as possible but when wanting to customize the code it is

> > often necessary to move it out of the Windows Form Designer area so 

once

> > it is customized it won't be overwrite by the designer.  There are some

> > programs that can't be written with designer generated code.  At that

> > point I'm hand coding but I still like the IDE as my editor.  More than

> > being against the IDE and proud of notepad, I think it's a matter of

> > being proud of understanding the code.  

> > 

> > _____________________________________________

> >  

> > Kyle Dunn

> > Chief Information Officer

> > Funeral Services, Inc.

> > xxx-xxx-xxxx  x 309

> > Kyle@F...

> > 

> > -----Original Message-----

> > From: Curtner, Lynn [mailto:lynn.curtner@p...] 

> > Sent: Tuesday, February 12, 2002 9:12 AM

> > To: aspx_beginners

> > Subject: [aspx_beginners] RE: VS.Net ADO.Net Controls

> > 

> > 

> > Yeah, what do these old-timer asp guys have against the IDE?  Everyone

> > seems 

> > so proud of being able to do everything in Notepad.  For me, using the

> > IDE seems

> > like the only sensible course of action...

> > 

> > > ----------

> > > From: 	jude the obscure[SMTP:jude@j...]

> > > Reply To: 	aspx_beginners

> > > Sent: 	Monday, February 11, 2002 8:22 PM

> > > To: 	aspx_beginners

> > > Subject: 	[aspx_beginners] VS.Net ADO.Net Controls

> > > 

> > > Though most of my ADO stuff is currently hand-coded, I thought the 

new

> > VS.Net(VB) IDE might offer some short cuts worth looking into. My

> > question:

> > >  

> > > Is it possible to use the VB.Net Data controls in an .aspx project

> > WITHOUT having to do any manual coding?

> > >  

> > > Stated another way, is some manual coding always required even if one

> > uses the proper Data controls when doing an .aspx project.

> > >  

> > > The 3-4 books I've bought on .Net programming all (disappointingly)

> > shy away from talking about putting together an .aspx project from

> > within the IDE, or if they use the IDE, they still hand-cdoe and avoid

> > the controls.

> > >  

> > > Thanks!

> > >  

> > > jk

> > >  

> > > (I may duplicate this message in the ADO.Net forum.)




> > $subst('Email.Unsub'). 

> > > 

> > 




> > $subst('Email.Unsub').

> > 




> > 

Message #6 by mbreeve@r... on Wed, 13 Feb 2002 10:54:59
Sorry, I forgot to add my name in the last one...



Kyle:

 

I got to the stage you mention, i.e. I need to use the IDE for editing and 

building, but I don't want to let the designer overwrite my recently hand-

edited HTML and Javascript code (which I did originally get from the 

designer). Unfortunately, this does keep happening.



What do you mean by "move it out the Windows Form Designer area"? I expect 

there is some VS.NET menu selection, or something like that, just staring 

me in the face. At the moment, I just can't see it...



Martin Reeve



> > 

> > > ----------

> > > From: 	Kyle[SMTP:Kyle@T...]

> > > Reply To: 	aspx_beginners

> > > Sent: 	Tuesday, February 12, 2002 12:05 PM

> > > To: 	aspx_beginners

> > > Subject: 	[aspx_beginners] RE: VS.Net ADO.Net Controls

> > > 

> > > The IDE is great but it has limitations for code generation.  I use 

the

> > > IDE as much as possible but when wanting to customize the code it is

> > > often necessary to move it out of the Windows Form Designer area so 

> once

> > > it is customized it won't be overwrite by the designer.  There are 

some

> > > programs that can't be written with designer generated code.  At that

> > > point I'm hand coding but I still like the IDE as my editor.  More 

than

> > > being against the IDE and proud of notepad, I think it's a matter of

> > > being proud of understanding the code.  

> > > 

> > > _____________________________________________

> > >  

> > > Kyle Dunn

> > > Chief Information Officer

> > > Funeral Services, Inc.

> > > xxx-xxx-xxxx  x 309

> > > Kyle@F...

> > > 

> > > -----Original Message-----

> > > From: Curtner, Lynn [mailto:lynn.curtner@p...] 

> > > Sent: Tuesday, February 12, 2002 9:12 AM

> > > To: aspx_beginners

> > > Subject: [aspx_beginners] RE: VS.Net ADO.Net Controls

> > > 

> > > 

> > > Yeah, what do these old-timer asp guys have against the IDE?  

Everyone

> > > seems 

> > > so proud of being able to do everything in Notepad.  For me, using 

the

> > > IDE seems

> > > like the only sensible course of action...

> > > 

> > > > ----------

> > > > From: 	jude the obscure[SMTP:jude@j...]

> > > > Reply To: 	aspx_beginners

> > > > Sent: 	Monday, February 11, 2002 8:22 PM

> > > > To: 	aspx_beginners

> > > > Subject: 	[aspx_beginners] VS.Net ADO.Net Controls

> > > > 

> > > > Though most of my ADO stuff is currently hand-coded, I thought the 

> new

> > > VS.Net(VB) IDE might offer some short cuts worth looking into. My

> > > question:

> > > >  

> > > > Is it possible to use the VB.Net Data controls in an .aspx project

> > > WITHOUT having to do any manual coding?

> > > >  

> > > > Stated another way, is some manual coding always required even if 

one

> > > uses the proper Data controls when doing an .aspx project.

> > > >  

> > > > The 3-4 books I've bought on .Net programming all (disappointingly)

> > > shy away from talking about putting together an .aspx project from

> > > within the IDE, or if they use the IDE, they still hand-cdoe and 

avoid

> > > the controls.

> > > >  

> > > > Thanks!

> > > >  

> > > > jk

> > > >  

> > > > (I may duplicate this message in the ADO.Net forum.)




> > > $subst('Email.Unsub'). 

> > > > 

> > > 




> > > $subst('Email.Unsub').

> > > 




> > > 

Message #7 by "Kyle" <Kyle@T...> on Wed, 13 Feb 2002 07:15:21 -0500
Sorry, no special menu item for this.  The only example I can give you

applies to Windows Forms because I am working on a windows desktop

application at the moment, not a web application.  But I suspect you

might be able to translate the concept to your application so here goes

...



In a Windows Form there is a method that the forms generator uses to

write code.  This occurs in the code behind page.  It's called

InitializeComponent().  Everything in this method is generated by the

forms designer and when you toggle between code view and design view the

code in this method is rewritten by the forms generator.  If you look in

the constructor that substantiates the class you will find the

InitializeComponent() method is called.  The comments inserted by the

IDE that follow that method call say:



//

// TODO: Add any constructor code after InitializeComponent call

//



This is where you insert code to add public objects and other custom

code.  This area works well for initializing code.  The next area I use

is the On Form Load event for working with objects that have been

instantiated in the class constructor.  This is where I currently might

fill a custom dataset.  I know this example doesn't apply directly to

your challenge but hoped it might help illustrate that you must now get

a feel for the areas that are overwritten in your ASP.NET app and find

the space immediately following.

_____________________________________________



Kyle Dunn

Chief Information Officer

Funeral Services, Inc.

xxx-xxx-xxxx  x 309

Kyle@F...



-----Original Message-----

From: mbreeve@r... [mailto:mbreeve@r...]

Sent: Wednesday, February 13, 2002 5:51 AM

To: aspx_beginners

Subject: [aspx_beginners] RE: VS.Net ADO.Net Controls



Kyle:



I got to the stage you mention, i.e. I need to use the IDE for editing

and

building, but I don't want to let the designer overwrite my recently

hand-

edited HTML and Javascript code (which I did originally get from the

designer). Unfortunately, this does keep happening.



What do you mean by "move it out the Windows Form Designer area"? I

expect

there is some VS.NET menu selection, or something like that, just

staring

me in the face. At the moment, I just can't see it...

>

> > ----------

> > From: 	Kyle[SMTP:Kyle@T...]

> > Reply To: 	aspx_beginners

> > Sent: 	Tuesday, February 12, 2002 12:05 PM

> > To: 	aspx_beginners

> > Subject: 	[aspx_beginners] RE: VS.Net ADO.Net Controls

> >

> > The IDE is great but it has limitations for code generation.  I use

the

> > IDE as much as possible but when wanting to customize the code it is

> > often necessary to move it out of the Windows Form Designer area so

once

> > it is customized it won't be overwrite by the designer.  There are

some

> > programs that can't be written with designer generated code.  At

that

> > point I'm hand coding but I still like the IDE as my editor.  More

than

> > being against the IDE and proud of notepad, I think it's a matter of

> > being proud of understanding the code. 

> >

> > _____________________________________________

> > 

> > Kyle Dunn

> > Chief Information Officer

> > Funeral Services, Inc.

> > xxx-xxx-xxxx  x 309

> > Kyle@F...

> >

> > -----Original Message-----

> > From: Curtner, Lynn [mailto:lynn.curtner@p...]

> > Sent: Tuesday, February 12, 2002 9:12 AM

> > To: aspx_beginners

> > Subject: [aspx_beginners] RE: VS.Net ADO.Net Controls

> >

> >

> > Yeah, what do these old-timer asp guys have against the IDE?

Everyone

> > seems

> > so proud of being able to do everything in Notepad.  For me, using

the

> > IDE seems

> > like the only sensible course of action...

> >

> > > ----------

> > > From: 	jude the obscure[SMTP:jude@j...]

> > > Reply To: 	aspx_beginners

> > > Sent: 	Monday, February 11, 2002 8:22 PM

> > > To: 	aspx_beginners

> > > Subject: 	[aspx_beginners] VS.Net ADO.Net Controls

> > >

> > > Though most of my ADO stuff is currently hand-coded, I thought the



new

> > VS.Net(VB) IDE might offer some short cuts worth looking into. My

> > question:

> > > 

> > > Is it possible to use the VB.Net Data controls in an .aspx project

> > WITHOUT having to do any manual coding?

> > > 

> > > Stated another way, is some manual coding always required even if

one

> > uses the proper Data controls when doing an .aspx project.

> > > 

> > > The 3-4 books I've bought on .Net programming all

(disappointingly)

> > shy away from talking about putting together an .aspx project from

> > within the IDE, or if they use the IDE, they still hand-cdoe and

avoid

> > the controls.

> > > 

> > > Thanks!

> > > 

> > > jk

> > > 

> > > (I may duplicate this message in the ADO.Net forum.)




> > $subst('Email.Unsub').

> > >

> >




> > $subst('Email.Unsub').

> >




$subst('Email.Unsub').

> >






$subst('Email.Unsub').

Message #8 by "Olav Benum" <wrox@b...> on Wed, 13 Feb 2002 15:05:37
> This is a multi-part message in MIME format.

> 

> ------=_NextPart_000_0001_01C1B339.DE096530

> Content-Type: text/plain;

> 	charset="us-ascii"

> Content-Transfer-Encoding: 7bit

> 

> Though most of my ADO stuff is currently hand-coded, I thought the new

> VS.Net(VB) IDE might offer some short cuts worth looking into. My

> question:

>  

> Is it possible to use the VB.Net Data controls in an .aspx project

> WITHOUT having to do any manual coding?

You need to fill it manually, othervise you can do everything

Visually.



Get a design-view.  Drop a datadapter ( view - toolbox) or drag-drop a 

table

from the server explorer.



Right-click data-adapter, configure it.



On the top menu do data - generate dataset.



Drop a grid and bind it to the dataset.



Hope it helps

Olav














  Return to Index