Connecting Tech Pros Worldwide Forums | Help | Site Map

Basic 'What can ASP do' question

dgk
Guest
 
Posts: n/a
#1: Nov 19 '05
I'm trying to persuade my company to use ASP.NET for a development
effort but I'm pretty weak in both ASP.NET and web development. I've
explained that ASP.NET works by turning the controls on the page into
html and java script so we don't have to write html and javascript
ourselves but clearly we need to write some js anyway since I have to
do that just to set the focus to the first control on the webpage.

As an example, how can I do this in ASP.Net:
1) user enters some text in a textbox on part of a form
2) whole form is submitted? or just a service is called?
2) the server responds with a list of names matching the text
3) the user is given a list of matches (on a subform or listbox?) and
selects one which is inserted into a list, and the user returns to
enter more text for another lookup until done.

I can set autopostback and the whole form is submitted when the user
presses enter. Seems wasteful. How would I just call a webservice that
would update a listbox without a trip to the server each time?

In general, how much can actually be done directly using server-side
controls (including third-party ones) without having to write our own
code once we want to do more than "hello world"?



Mark Rae
Guest
 
Posts: n/a
#2: Nov 19 '05

re: Basic 'What can ASP do' question


"dgk" <sonicechoes-spamless@hot-nospamp-mail.com> wrote in message
news:c1jg31pt65uga3tfhdgipatosii2qqnqlr@4ax.com...
[color=blue]
> I'm trying to persuade my company to use ASP.NET for a development
> effort but I'm pretty weak in both ASP.NET and web development. I've
> explained that ASP.NET works by turning the controls on the page into
> html and java script so we don't have to write html and javascript[/color]

http://www.amazon.com/exec/obidos/tg...books&n=507846


Hans Kesting
Guest
 
Posts: n/a
#3: Nov 19 '05

re: Basic 'What can ASP do' question


dgk wrote:[color=blue]
> I'm trying to persuade my company to use ASP.NET for a development
> effort but I'm pretty weak in both ASP.NET and web development. I've
> explained that ASP.NET works by turning the controls on the page into
> html and java script so we don't have to write html and javascript
> ourselves but clearly we need to write some js anyway since I have to
> do that just to set the focus to the first control on the webpage.
>
> As an example, how can I do this in ASP.Net:
> 1) user enters some text in a textbox on part of a form
> 2) whole form is submitted? or just a service is called?
> 2) the server responds with a list of names matching the text
> 3) the user is given a list of matches (on a subform or listbox?) and
> selects one which is inserted into a list, and the user returns to
> enter more text for another lookup until done.
>
> I can set autopostback and the whole form is submitted when the user
> presses enter. Seems wasteful. How would I just call a webservice that
> would update a listbox without a trip to the server each time?
>
> In general, how much can actually be done directly using server-side
> controls (including third-party ones) without having to write our own
> code once we want to do more than "hello world"?
>
>[/color]

You still need to write/know html. The main point (as I see it) is not
"not writing html", but having an object-model that you can work with
(random access) where design and code are separated, as opposed to the
asp (php, jsp, ..) method of builing an html-file as you progress
through the code.
Plus you have the whole .net framework full of classes to do all sorts
of things.

The output is designed to work with any browser (which is not the same
as "works identically on any browser"!) and uses only html and
javascript. So a fancy IE-only client-server interaction is not standard.



--
Hans Kesting
Kevin Spencer
Guest
 
Posts: n/a
#4: Nov 19 '05

re: Basic 'What can ASP do' question


I don't think you really understand ASP.Net. First, if you think that you
don't need to write HTML any more, you're sadly mistaken. Second, if in fact
you think that ASP.Net is simpler to use in general than ASP, you're way off
track. The biggest advantage of ASP.Net over ASP is programming power, and
that is by an exponential factor. ASP.Net is powerful, as powerful as a
programming technology can be. It is also quite a learning curve, expecially
if your only experience is writing VBScript for ASP. So, if you're looking
at migrating to ASP.Net, expect to spend a long time learning the object
model, acquainting yourself with OOP practices and techniques, and retooling
your way of programming in general.

But is it worth it? Absolutely, if you plan to write a web application of
any size, extensibility, and/or complexity.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.

"dgk" <sonicechoes-spamless@hot-nospamp-mail.com> wrote in message
news:c1jg31pt65uga3tfhdgipatosii2qqnqlr@4ax.com...[color=blue]
> I'm trying to persuade my company to use ASP.NET for a development
> effort but I'm pretty weak in both ASP.NET and web development. I've
> explained that ASP.NET works by turning the controls on the page into
> html and java script so we don't have to write html and javascript
> ourselves but clearly we need to write some js anyway since I have to
> do that just to set the focus to the first control on the webpage.
>
> As an example, how can I do this in ASP.Net:
> 1) user enters some text in a textbox on part of a form
> 2) whole form is submitted? or just a service is called?
> 2) the server responds with a list of names matching the text
> 3) the user is given a list of matches (on a subform or listbox?) and
> selects one which is inserted into a list, and the user returns to
> enter more text for another lookup until done.
>
> I can set autopostback and the whole form is submitted when the user
> presses enter. Seems wasteful. How would I just call a webservice that
> would update a listbox without a trip to the server each time?
>
> In general, how much can actually be done directly using server-side
> controls (including third-party ones) without having to write our own
> code once we want to do more than "hello world"?
>
>[/color]


dgk
Guest
 
Posts: n/a
#5: Nov 19 '05

re: Basic 'What can ASP do' question


On Wed, 16 Mar 2005 11:09:09 -0500, "Kevin Spencer"
<kevin@DIESPAMMERSDIEtakempis.com> wrote:
[color=blue]
>I don't think you really understand ASP.Net. First, if you think that you
>don't need to write HTML any more, you're sadly mistaken. Second, if in fact
>you think that ASP.Net is simpler to use in general than ASP, you're way off
>track. The biggest advantage of ASP.Net over ASP is programming power, and
>that is by an exponential factor. ASP.Net is powerful, as powerful as a
>programming technology can be. It is also quite a learning curve, expecially
>if your only experience is writing VBScript for ASP. So, if you're looking
>at migrating to ASP.Net, expect to spend a long time learning the object
>model, acquainting yourself with OOP practices and techniques, and retooling
>your way of programming in general.
>
>But is it worth it? Absolutely, if you plan to write a web application of
>any size, extensibility, and/or complexity.[/color]

I'll second the learning curve phase. I'm an app developer (VB6,
Fortan, Cobol, Vax Basic) and any Web stuff is quite different. I
certainly expect to need Javascript but I'm not sure why I need to
write HTML. Unless I'm writing controls. Well, I know enough HTML to
get by at the moment and I'll be learning more. I know a lot of the
Net framework and VB.Net. So far the big problem is just figuring out
how to do simple things, like determining what control caused submit
in the PageLoad event. That fires before the click event of the
control it seems. Oh well, time to dive into some books.

Luckily my newserver has about a two year retention on this group so
many questions have already been asked and answered.
Kevin Spencer
Guest
 
Posts: n/a
#6: Nov 19 '05

re: Basic 'What can ASP do' question


> Luckily my newserver has about a two year retention on this group so[color=blue]
> many questions have already been asked and answered.[/color]

Bravo, dgk! It encourages me tremendously to meet someone who can feed
themselves!

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.

"dgk" <sonicechoes-spamless@hot-nospamp-mail.com> wrote in message
news:u2rg31h9td7ckm1qm8r1ot92s624h6pma1@4ax.com...[color=blue]
> On Wed, 16 Mar 2005 11:09:09 -0500, "Kevin Spencer"
> <kevin@DIESPAMMERSDIEtakempis.com> wrote:
>[color=green]
>>I don't think you really understand ASP.Net. First, if you think that you
>>don't need to write HTML any more, you're sadly mistaken. Second, if in
>>fact
>>you think that ASP.Net is simpler to use in general than ASP, you're way
>>off
>>track. The biggest advantage of ASP.Net over ASP is programming power, and
>>that is by an exponential factor. ASP.Net is powerful, as powerful as a
>>programming technology can be. It is also quite a learning curve,
>>expecially
>>if your only experience is writing VBScript for ASP. So, if you're looking
>>at migrating to ASP.Net, expect to spend a long time learning the object
>>model, acquainting yourself with OOP practices and techniques, and
>>retooling
>>your way of programming in general.
>>
>>But is it worth it? Absolutely, if you plan to write a web application of
>>any size, extensibility, and/or complexity.[/color]
>
> I'll second the learning curve phase. I'm an app developer (VB6,
> Fortan, Cobol, Vax Basic) and any Web stuff is quite different. I
> certainly expect to need Javascript but I'm not sure why I need to
> write HTML. Unless I'm writing controls. Well, I know enough HTML to
> get by at the moment and I'll be learning more. I know a lot of the
> Net framework and VB.Net. So far the big problem is just figuring out
> how to do simple things, like determining what control caused submit
> in the PageLoad event. That fires before the click event of the
> control it seems. Oh well, time to dive into some books.
>
> Luckily my newserver has about a two year retention on this group so
> many questions have already been asked and answered.[/color]


Hans Kesting
Guest
 
Posts: n/a
#7: Nov 19 '05

re: Basic 'What can ASP do' question


dgk wrote:[color=blue]
> So far the big problem is just figuring out
> how to do simple things, like determining what control caused submit
> in the PageLoad event. That fires before the click event of the
> control it seems. Oh well, time to dive into some books.
>[/color]

Page_Load does indeed fire before click, but you can assign
a click-event handler to handle the click. No need to write logic
into Page_Load for this.
In the designer, just double-click on the button and the (empty)
handler is created and hooked up.


--
Hans Kesting
dgk
Guest
 
Posts: n/a
#8: Nov 19 '05

re: Basic 'What can ASP do' question


On Thu, 17 Mar 2005 14:54:48 +0100, Hans Kesting
<news.2.hansdk@spamgourmet.com> wrote:
[color=blue]
>dgk wrote:[color=green]
>> So far the big problem is just figuring out
>> how to do simple things, like determining what control caused submit
>> in the PageLoad event. That fires before the click event of the
>> control it seems. Oh well, time to dive into some books.
>>[/color]
>
>Page_Load does indeed fire before click, but you can assign
>a click-event handler to handle the click. No need to write logic
>into Page_Load for this.
>In the designer, just double-click on the button and the (empty)
>handler is created and hooked up.[/color]

Right, I found that out. But since the page_load fires first I would
like to know at that point what triggered it. I checked the Sender
argument but that is just the aspx page. Maybe it's in Session
somewhere.
Closed Thread