473,783 Members | 2,286 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Global subroutines

Hi Tom !

Sorry about the messy quoting, Google is playing tricks on me at the
moment.
Global.asax is where you normally have the Global Application
and Session variables and code to manipulate them. It starts
and ends with <script></script> tags.

Yours looks like a compiled version of it.

It is just like any ASP.net page. If you use code-inside, you
surround the code with the script tags. To make the code into
a code-behind file, you move the code to a new file and leave
out the script tags.
I had never thought of it that way. I'm not saying you're wrong, to be
honest I'm not at all sure, but :
1) I've searched hi and lo and can't find anything resembling script
tags in Global.asax.
2) There has to be a Global shared (static) class, because that's
where the variables are held.
3) In VS, contrarily to plain aspx pages, you don't have access to
HTML code for Global.asax (usually, an aspx combo has three different
views : the html view and the design view, which are two tabs on the
same window, and the code-behind file which sits in another window.
There's no design or html tab in Global.asax.
4) As far as I know, aspx stands for Active Server Page eXtended(?),
asax stands for Active Server Application eXtended(?). It's supposed
to be an app, not an page as such. You cannot, for instance, drop a
html table on Global.asax, but mind you, you can drop Windows Forms
controls on it !!

So, I do believe it's not an aspx but a proper app, contained in a
class, and not enclosed in a script block. Again, I could be wrong. I
wish some guru would help us there.
To have a class, I think you would need to compile the file, as you said
and you would have to have the codebehind/inherits on all my pages. I am
trying to get around this.
You definitely need to compile the file in any case. Compiling it
creates a dll in a bin directory, without which no aspx page can be
served (plain html can, though, but that's IIS working under the
scene). You don't have to inherit it on any page, because the
structure is as follows :

Global.asax inherits from the System.Web.Http Application class and is
inside the namespace that's named after your project. As it is shared,
it can be used from any other object that is inside that namespace, so
any page inside that namespace can refer to Global.asax simply by
using, for instance, "Global.SomeMet hod" (provided that method is
public, obviously).
Pages inherit from System.Web.Ui class. They don't need to inherit
from the application itself (read : they musn't).
Each page has an associated code-behind file, and the aspx file
inherits from the class that lies in the code-behind file. With VS,
all this is totally transparent and taken care for you by the
Framework.
The other problem is - how would I handle 2 codebehind files. Each
aspx page would have it's own code behind and then you have the
Global one. How would you set that up in your ASP pages (you would
need 2 inherits and 2 codebehind statements).
You don't. Again, I think your misconception comes from the fact that
you think the app is not compiled. Think of it this way : the app
contains many classes, some being pages, some being code-behind files,
and one being the Global object. All these classes can (theoretically)
talk to each other, and that's why, to return to the beginning of your
question, you can include shared methods in the Global class and use
them from other classes (code-behind files).
I did that last night, as you suggested, and just have to wait for the CD.


Well, that's very good news for you, because I'm positive that it'll
all become clear very quickly, and I'm also quite sure that you'll
have tremendous fun. VS is the best toy I ever dreamed of, it's fast,
deep, smart, coherent and has the most impressive optimisations. In a
month and a half, I've developped a program that used to cost around
100.000 $ five years ago. I'm in no way affiliated blah blah,
obviously.

So, have fun with it !

Michel
Nov 19 '05
22 3800
"tshad" <ts**********@f tsolutions.com> wrote in message
news:OH******** ******@TK2MSFTN GP09.phx.gbl...
Also, I can't find a "code" view in the View menu and can't find anything
that has an F7 shortcut on it.

I tried opening up one of my current pages and it show the code, but I
can't find a way to see how it looks in a design mode. There must be one
(I would assume), similar to the one you had me put the label on.

This is an aspx page. I wanted to see how the asp.net objects are
rendered inside VS.
I just looked at the page you had me open and it does show code,designer,
(html source or design) plus a couple of others. It then it goes to
Solution Explorer. It appears that if you open a page created outside of
VS, it won't give you a design view. The view menu starts at Solution
Explorer.

Also, what is Web Browser at the bottom of the View menu for. I assumed it
would open your page in a browser, but it just opens the
http://msdn.microsoft.com/ site.

Thanks,

Tom
Thanks,

Tom
"tshad" <ts**********@f tsolutions.com> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
Hi Michel,

I just started doing your list. And had a question.

"fd123456" <fd******@hotma il.com> wrote in message
news:c8******** *************** ***@posting.goo gle.com...
Hi Tom!

Here is a somewhat standard procedure to achieve what you're looking
for.

As you will see, the "Visual" in "Visual Studio" will save you a lot
of time/hassles.

I will assume that you have never used any version of VS.

1) Launch VS. Create a Solution (File / New / New Solution). In the
Dialog that appears, just type a name, don't choose "Visual Basic
Projects" just yet. Let's call it TomSolution. Click OK.

2) Show the Solution Explorer window by choosing that option in the
View menu (I guess it's called View, my version isn't an english one,
third menu anyway).

3) Right-click on the Solution name in the Solution Explorer window,
and click "Add / Add new project".

4) In the dialog that appears, you can now choose "Visual Basic
Projects". Then choose "ASP.Net Web Application" in the icon list on
the right. Give it a name - TomApp - and click OK. In fact, you're not
giving a name, but the full path of the web app, in this case,
"http://localhost/TomApp".


It won't let me put in a name, but will allow me to change the location,
as you mention and then the name changes. I assume this is how it is
done.

5) After a few seconds, a default project is created. The Solution
Explorer shows a list of new items :
TomApp (the project)
References (a folder)
AssemblyInfo.vb
Global.asax
Styles.css
Web.config
WebForm1.aspx

6) Double-click on Global.asax. You get to the Design view of
Global.asax. This is a place where you're supposed to add components,
I guess, but I've never used it this way. Type F7 or choose "Code" in
the "View" menu.

7) That's it!!! This is where you wanted to be since the beginning. At
this point, have a glass of champagne, it's on me!!


Had my glass. Where do I send the bill :)

8) Add a new function below the existing subs:

Shared Function TextFeed()
Return "Hello global shared world"
End Function

9) Double-click on Webform1.aspx in the Solution Explorer. This takes
you to the design view of that page.

10) There is a toolbox tab somewhere (you'll get used to it very
quickly, but it can be a little unsettling at the beginning : tabs
everywhere, pinned to the left, docked to the right...). Click on it,
make sure the "Web Forms" subtab is selected, click on "Label" and
drag that to the page, anywhere. Just leave it's properties at their
default.

11) Type F7 or click on "Code" in the View menu.

12) A default stub is already in here. You have a Page_Load sub, which
is executed when the... page loads, yes. Inside this sub, just type :
Label1.Text = Global.TextFeed

13) Type F5 or choose "Run" in the Debug menu (could be "Start"
instead of "Run", not quite sure). This opens your default browser and
shows the Webform1.aspx page that you created. If everything went
well, it should show "Hello global shared world" somewhere in the
middle of it.


I tried that, but got an error:

"Error while trying to run object: Unable to start debugging on the web
server. Debugging failed because integrated Windows authentication is
not enabled. Click help for more information."

My other pages run, why not VS?

Thanks,

Tom
The Shared Function you created in the Global class is indeed global
to the application, that is, all pages and classes that it contains.
It is also static, which means that it is shared by all instances of
that application (which instantiates itself everytime a user logs onto
your site).

Be aware that, whereas Global.asax has two different views (Design and
Code), aspx pages have three (Graphical Design mode, HTML Design mode,
and Code).

If anything is still unclear, please ask.

Have fun!

Michel


"tshad" <ts**********@f tsolutions.com> wrote in message
news:<OQ******* *******@TK2MSFT NGP14.phx.gbl>. ..
"fd123456" <fd******@hotma il.com> wrote in message
news:c8******** *************** ***@posting.goo gle.com...
> "tshad" <ts**********@f tsolutions.com> wrote:
>> I just got the VS today and will probably not get to it until next
>> week,
>> but
>> I will try your examples. I need to get a handle on the whole code
>> behind
>> business.
>
> Lucky you ! :)
>
I finally loaded my trial version of VS and need a little help getting
started with setting up the Global.asax.vb file to do my shared
functions.

I am not starting a problem (I already have that set up without
Code-behind
at the moment).

I just want to create the Global.asax.vb file. I am not sure what I
write
and what VS does for me.

Do I just start with a new Text file?

How do I tell it that this is the Global.asax file (other than saving
it
that way)?

Where do I tell it to compile it?

I assume this will create my .dll that I move to my bin folder.

Thanks,

Tom



Nov 19 '05 #11
Hi Tom,

Let me try to answer your last 3 messages (sorry for being late, I
only browse the groups when I get the chance).
4) In the dialog that appears, you can now choose "Visual Basic
Projects". Then choose "ASP.Net Web Application" in the icon list on the right. Give it a name - TomApp - and click OK. In fact, you're not giving a name, but the full path of the web app, in this case,
"http://localhost/TomApp".
It won't let me put in a name, but will allow me to change the location, as
you mention and then the name changes. I assume this is how it is done.
It is. The idea behind it being that when you specify a location and a
name for the folder, it becomes a physical directory in your
c:\Inetpub\wwwr oot\ folder, and also a web application of that same
name, pointing to that directory.
Where do I send the bill :)
bg****@microsof t.com ! :p
13) Type F5 or choose "Run" in the Debug menu (could be "Start"
instead of "Run", not quite sure). This opens your default browser and shows the Webform1.aspx page that you created. If everything went
well, it should show "Hello global shared world" somewhere in the
middle of it.

I tried that, but got an error:

"Error while trying to run object: Unable to start debugging on the web
server. Debugging failed because integrated Windows authentication is not
enabled. Click help for more information."

My other pages run, why not VS?
Oh, this is one of the things that's quite difficult to set up at the
beginning, but once you get it right, you forget all about it. Guess
what? I forgot all about it. IIRC, it's about giving the debugger
enough permissions to attach itself to the IIS process. Try this :

- Somewhere on your computer is something called "IIS Internet
Services". Your best bet would be Control Panels/Administrative
tools/IIS Internet Services (it might have a slightly different name,
my XP is not an english one). And I'm not quite sure where it is
because I moved it. Try and locate it, and launch it.

- It shows a tree, like this :
IIS Internet Services
+ Name of your computer
+ Web sites
+ Default Web Site
+ IIS Help
+ _vti_bin
+ printers
...
+ TomApp (if you called it that, obviously)

- Right-click on TomApp. Choose the Folder Security tab. In "Anonymous
connections..." , click on "Change". In the dialog box that shows up,
all the way down is a checkbox "Windows integrated authentificatio n".
Check it, OK, OK, you should be good to go.
Also, I can't find a "code" view in the View menu and can't find anything
that has an F7 shortcut on it.

I tried opening up one of my current pages and it show the code, but I can't
find a way to see how it looks in a design mode. There must be one (I would
assume), similar to the one you had me put the label on.

This is an aspx page. I wanted to see how the asp.net objects are rendered
inside VS.
I think I know what the problem is. You probably imported or copied
your own pages into the solution/project/web folder. But when you
create an aspx page from *inside* VS, it does a lot of stuff : it sets
up and creates the corresponding code-behind file, plus a .resx files
that contains definitions for numerous things, like handles for object
and stuff. To be honest, the .resx file is not something I'd like to
dwell into. I've had a glimpse of it, once or twice, and very quickly
decided I'd never come back, and never did.

So, the problem is that, as you didn't create the page from inside VS,
the code-behind page hasn't been created and so you don't get the Code
menu. If I were you, I'd create a page in VS, then delete it's content
and *paste* the content of your own page, rather than copying the page
into the folder. Then you'll have all options available.
I just looked at the page you had me open and it does show code,designer,
(html source or design) plus a couple of others. It then it goes to
Solution Explorer. It appears that if you open a page created outside of
VS, it won't give you a design view. The view menu starts at Solution
Explorer.
Exactly. I hadn't tested this, but you're confirming what I suspected.
It's all about what VS does for you. The other thread you created
(where everyone is speaking for or against code-behind, which makes a
very interesting read, btw) highlights the fact that code-behind is -
I think - the way to go when you use VS, and not at all the way to go
when you don't because VS does an awful lot of stuff to ease your work
: it creates code to initialize the controls when you just drag'n'drop
them on the html editor in design view (you can see this when you go
to Code View and unfold the "Web Form Designer generated code"
section, even more impressive when you start using the DataAdapter
objects, the amount and quality of generated code is absolutely
amazing), handles the session-persistent objects, handles the events,
postback mechanisms, and so on. It really cuts down the amount of
coding you have to do. So, again, go the VS way all the way, trying to
compromise between VS-automated and "manual" modes will only bring
frustration. Even when I said "paste in the code of your own page", I
should have said : "restart your page from scratch in VS". It appears
to be a waste of time, but in the end, I'm quite confident it'll save
you a lot of time. Plus it will give you a chance to "practice". As
you've got a background with VS6, you'll get up to speed in no time.
Also, what is Web Browser at the bottom of the View menu for. I assumed
it would open your page in a browser, but it just opens the
http://msdn.microsoft.com/ site.


It's only an embedded browser. If you call it this way (from the View
menu), it takes you to the msdn site because that's the default
startup page (must be an option somewhere in the prefs), but you can
also call it by right-clicking on a page in html design view and
clicking on "Show in browser". You also have an url bar that appears,
which you can use to surf anywhere. I guess it's all about having a
self-contained IDE, but you can just use Explorer or any other
browser, to the same effect. I believe that when you test your project
with F5, the default behavior is to launch an external Explorer
windows. On a fast machine, either solution is the same, speed-wise. I
just never use the internal browser. But that's just me.

I understand your project is already 30-ish pages. I realize it could
be a hassle to start over from scratch, but I'm not sure there's an
alternative. IMHO, trying to paste bits of it will only take more
time, lead to confusion, the controls won't be properly initialized...
Anyway, it's your choice. Try both ways.

HTH,

Michel
Nov 19 '05 #12
> bg****@microsof t.com ! :p

Haven't ever seen that email address, but it could work. The one that is
known is bi***@microsoft .com.

--
;-),

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.

"fd123456" <fd******@hotma il.com> wrote in message
news:c8******** *************** ***@posting.goo gle.com...
Hi Tom,

Let me try to answer your last 3 messages (sorry for being late, I
only browse the groups when I get the chance).
4) In the dialog that appears, you can now choose "Visual Basic
Projects". Then choose "ASP.Net Web Application" in the icon list on the right. Give it a name - TomApp - and click OK. In fact, you're not giving a name, but the full path of the web app, in this case,
"http://localhost/TomApp".
It won't let me put in a name, but will allow me to change the location,
as
you mention and then the name changes. I assume this is how it is done.


It is. The idea behind it being that when you specify a location and a
name for the folder, it becomes a physical directory in your
c:\Inetpub\wwwr oot\ folder, and also a web application of that same
name, pointing to that directory.
Where do I send the bill :)


bg****@microsof t.com ! :p
13) Type F5 or choose "Run" in the Debug menu (could be "Start"
instead of "Run", not quite sure). This opens your default browser and shows the Webform1.aspx page that you created. If everything went
well, it should show "Hello global shared world" somewhere in the
middle of it.

I tried that, but got an error:

"Error while trying to run object: Unable to start debugging on the web
server. Debugging failed because integrated Windows authentication is
not
enabled. Click help for more information."

My other pages run, why not VS?


Oh, this is one of the things that's quite difficult to set up at the
beginning, but once you get it right, you forget all about it. Guess
what? I forgot all about it. IIRC, it's about giving the debugger
enough permissions to attach itself to the IIS process. Try this :

- Somewhere on your computer is something called "IIS Internet
Services". Your best bet would be Control Panels/Administrative
tools/IIS Internet Services (it might have a slightly different name,
my XP is not an english one). And I'm not quite sure where it is
because I moved it. Try and locate it, and launch it.

- It shows a tree, like this :
IIS Internet Services
+ Name of your computer
+ Web sites
+ Default Web Site
+ IIS Help
+ _vti_bin
+ printers
...
+ TomApp (if you called it that, obviously)

- Right-click on TomApp. Choose the Folder Security tab. In "Anonymous
connections..." , click on "Change". In the dialog box that shows up,
all the way down is a checkbox "Windows integrated authentificatio n".
Check it, OK, OK, you should be good to go.
Also, I can't find a "code" view in the View menu and can't find anything
that has an F7 shortcut on it.

I tried opening up one of my current pages and it show the code, but I
can't
find a way to see how it looks in a design mode. There must be one (I
would
assume), similar to the one you had me put the label on.

This is an aspx page. I wanted to see how the asp.net objects are
rendered
inside VS.


I think I know what the problem is. You probably imported or copied
your own pages into the solution/project/web folder. But when you
create an aspx page from *inside* VS, it does a lot of stuff : it sets
up and creates the corresponding code-behind file, plus a .resx files
that contains definitions for numerous things, like handles for object
and stuff. To be honest, the .resx file is not something I'd like to
dwell into. I've had a glimpse of it, once or twice, and very quickly
decided I'd never come back, and never did.

So, the problem is that, as you didn't create the page from inside VS,
the code-behind page hasn't been created and so you don't get the Code
menu. If I were you, I'd create a page in VS, then delete it's content
and *paste* the content of your own page, rather than copying the page
into the folder. Then you'll have all options available.
I just looked at the page you had me open and it does show code,designer,
(html source or design) plus a couple of others. It then it goes to
Solution Explorer. It appears that if you open a page created outside of
VS, it won't give you a design view. The view menu starts at Solution
Explorer.


Exactly. I hadn't tested this, but you're confirming what I suspected.
It's all about what VS does for you. The other thread you created
(where everyone is speaking for or against code-behind, which makes a
very interesting read, btw) highlights the fact that code-behind is -
I think - the way to go when you use VS, and not at all the way to go
when you don't because VS does an awful lot of stuff to ease your work
: it creates code to initialize the controls when you just drag'n'drop
them on the html editor in design view (you can see this when you go
to Code View and unfold the "Web Form Designer generated code"
section, even more impressive when you start using the DataAdapter
objects, the amount and quality of generated code is absolutely
amazing), handles the session-persistent objects, handles the events,
postback mechanisms, and so on. It really cuts down the amount of
coding you have to do. So, again, go the VS way all the way, trying to
compromise between VS-automated and "manual" modes will only bring
frustration. Even when I said "paste in the code of your own page", I
should have said : "restart your page from scratch in VS". It appears
to be a waste of time, but in the end, I'm quite confident it'll save
you a lot of time. Plus it will give you a chance to "practice". As
you've got a background with VS6, you'll get up to speed in no time.
Also, what is Web Browser at the bottom of the View menu for. I assumed
it would open your page in a browser, but it just opens the
http://msdn.microsoft.com/ site.


It's only an embedded browser. If you call it this way (from the View
menu), it takes you to the msdn site because that's the default
startup page (must be an option somewhere in the prefs), but you can
also call it by right-clicking on a page in html design view and
clicking on "Show in browser". You also have an url bar that appears,
which you can use to surf anywhere. I guess it's all about having a
self-contained IDE, but you can just use Explorer or any other
browser, to the same effect. I believe that when you test your project
with F5, the default behavior is to launch an external Explorer
windows. On a fast machine, either solution is the same, speed-wise. I
just never use the internal browser. But that's just me.

I understand your project is already 30-ish pages. I realize it could
be a hassle to start over from scratch, but I'm not sure there's an
alternative. IMHO, trying to paste bits of it will only take more
time, lead to confusion, the controls won't be properly initialized...
Anyway, it's your choice. Try both ways.

HTH,

Michel

Nov 19 '05 #13
Michel,

Thanks for the info.

I think I will probably use VS to build classes (such as myUtils that are
not page specific) and Globals.asax, but as you say trying to use my other
pages in VS would be quite difficult. I am sure I would have the same
problem if I went from VS to DW.

I will probably look at using code-behind to allow someone to do some of the
design, but I will probably not compile it. I'll know better once I have
worked with it more.

Thanks for all the help,

Tom.

"fd123456" <fd******@hotma il.com> wrote in message
news:c8******** *************** ***@posting.goo gle.com...
Hi Tom,

Let me try to answer your last 3 messages (sorry for being late, I
only browse the groups when I get the chance).
4) In the dialog that appears, you can now choose "Visual Basic
Projects". Then choose "ASP.Net Web Application" in the icon list on the right. Give it a name - TomApp - and click OK. In fact, you're not giving a name, but the full path of the web app, in this case,
"http://localhost/TomApp".
It won't let me put in a name, but will allow me to change the location,
as
you mention and then the name changes. I assume this is how it is done.


It is. The idea behind it being that when you specify a location and a
name for the folder, it becomes a physical directory in your
c:\Inetpub\wwwr oot\ folder, and also a web application of that same
name, pointing to that directory.
Where do I send the bill :)


bg****@microsof t.com ! :p
13) Type F5 or choose "Run" in the Debug menu (could be "Start"
instead of "Run", not quite sure). This opens your default browser and shows the Webform1.aspx page that you created. If everything went
well, it should show "Hello global shared world" somewhere in the
middle of it.

I tried that, but got an error:

"Error while trying to run object: Unable to start debugging on the web
server. Debugging failed because integrated Windows authentication is
not
enabled. Click help for more information."

My other pages run, why not VS?


Oh, this is one of the things that's quite difficult to set up at the
beginning, but once you get it right, you forget all about it. Guess
what? I forgot all about it. IIRC, it's about giving the debugger
enough permissions to attach itself to the IIS process. Try this :

- Somewhere on your computer is something called "IIS Internet
Services". Your best bet would be Control Panels/Administrative
tools/IIS Internet Services (it might have a slightly different name,
my XP is not an english one). And I'm not quite sure where it is
because I moved it. Try and locate it, and launch it.

- It shows a tree, like this :
IIS Internet Services
+ Name of your computer
+ Web sites
+ Default Web Site
+ IIS Help
+ _vti_bin
+ printers
...
+ TomApp (if you called it that, obviously)

- Right-click on TomApp. Choose the Folder Security tab. In "Anonymous
connections..." , click on "Change". In the dialog box that shows up,
all the way down is a checkbox "Windows integrated authentificatio n".
Check it, OK, OK, you should be good to go.
Also, I can't find a "code" view in the View menu and can't find anything
that has an F7 shortcut on it.

I tried opening up one of my current pages and it show the code, but I
can't
find a way to see how it looks in a design mode. There must be one (I
would
assume), similar to the one you had me put the label on.

This is an aspx page. I wanted to see how the asp.net objects are
rendered
inside VS.


I think I know what the problem is. You probably imported or copied
your own pages into the solution/project/web folder. But when you
create an aspx page from *inside* VS, it does a lot of stuff : it sets
up and creates the corresponding code-behind file, plus a .resx files
that contains definitions for numerous things, like handles for object
and stuff. To be honest, the .resx file is not something I'd like to
dwell into. I've had a glimpse of it, once or twice, and very quickly
decided I'd never come back, and never did.

So, the problem is that, as you didn't create the page from inside VS,
the code-behind page hasn't been created and so you don't get the Code
menu. If I were you, I'd create a page in VS, then delete it's content
and *paste* the content of your own page, rather than copying the page
into the folder. Then you'll have all options available.
I just looked at the page you had me open and it does show code,designer,
(html source or design) plus a couple of others. It then it goes to
Solution Explorer. It appears that if you open a page created outside of
VS, it won't give you a design view. The view menu starts at Solution
Explorer.


Exactly. I hadn't tested this, but you're confirming what I suspected.
It's all about what VS does for you. The other thread you created
(where everyone is speaking for or against code-behind, which makes a
very interesting read, btw) highlights the fact that code-behind is -
I think - the way to go when you use VS, and not at all the way to go
when you don't because VS does an awful lot of stuff to ease your work
: it creates code to initialize the controls when you just drag'n'drop
them on the html editor in design view (you can see this when you go
to Code View and unfold the "Web Form Designer generated code"
section, even more impressive when you start using the DataAdapter
objects, the amount and quality of generated code is absolutely
amazing), handles the session-persistent objects, handles the events,
postback mechanisms, and so on. It really cuts down the amount of
coding you have to do. So, again, go the VS way all the way, trying to
compromise between VS-automated and "manual" modes will only bring
frustration. Even when I said "paste in the code of your own page", I
should have said : "restart your page from scratch in VS". It appears
to be a waste of time, but in the end, I'm quite confident it'll save
you a lot of time. Plus it will give you a chance to "practice". As
you've got a background with VS6, you'll get up to speed in no time.
Also, what is Web Browser at the bottom of the View menu for. I assumed
it would open your page in a browser, but it just opens the
http://msdn.microsoft.com/ site.


It's only an embedded browser. If you call it this way (from the View
menu), it takes you to the msdn site because that's the default
startup page (must be an option somewhere in the prefs), but you can
also call it by right-clicking on a page in html design view and
clicking on "Show in browser". You also have an url bar that appears,
which you can use to surf anywhere. I guess it's all about having a
self-contained IDE, but you can just use Explorer or any other
browser, to the same effect. I believe that when you test your project
with F5, the default behavior is to launch an external Explorer
windows. On a fast machine, either solution is the same, speed-wise. I
just never use the internal browser. But that's just me.

I understand your project is already 30-ish pages. I realize it could
be a hassle to start over from scratch, but I'm not sure there's an
alternative. IMHO, trying to paste bits of it will only take more
time, lead to confusion, the controls won't be properly initialized...
Anyway, it's your choice. Try both ways.

HTH,

Michel

Nov 19 '05 #14
Kevin, are you implying that He doesn't know how to use email aliases?
Oh, ye of little faith... :)

Michel

"Kevin Spencer" <ke***@DIESPAMM ERSDIEtakempis. com> wrote in message news:<#F******* *******@tk2msft ngp13.phx.gbl>. ..
bg****@microsof t.com ! :p


Haven't ever seen that email address, but it could work. The one that is
known is bi***@microsoft .com.

--
;-),

Kevin Spencer
Microsoft MVP
.Net Developer
Neither a follower nor a lender be.

Nov 19 '05 #15
You're absolutely welcome, Tom.

Proceed as you feel. In the end, if you manage to grab a non-demo
version of VS, I'm quite sure you'll put DW where it belongs : the
fond memories shelf.

By the way, the site that helped me the most when I started asp.net is
http://www.asp.net/tutorials/quickstart.aspx. You might want to check
it.

Have fun !

Michel
"tshad" <ts**********@f tsolutions.com> wrote in message news:<uC******* *******@TK2MSFT NGP10.phx.gbl>. ..
Michel,

Thanks for the info.

I think I will probably use VS to build classes (such as myUtils that are
not page specific) and Globals.asax, but as you say trying to use my other
pages in VS would be quite difficult. I am sure I would have the same
problem if I went from VS to DW.

I will probably look at using code-behind to allow someone to do some of the
design, but I will probably not compile it. I'll know better once I have
worked with it more.

Thanks for all the help,

Tom.

Nov 19 '05 #16
Hey, I said it COULD work! ;-)

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.

"fd123456" <fd******@hotma il.com> wrote in message
news:c8******** *************** ***@posting.goo gle.com...
Kevin, are you implying that He doesn't know how to use email aliases?
Oh, ye of little faith... :)

Michel

"Kevin Spencer" <ke***@DIESPAMM ERSDIEtakempis. com> wrote in message
news:<#F******* *******@tk2msft ngp13.phx.gbl>. ..
> bg****@microsof t.com ! :p


Haven't ever seen that email address, but it could work. The one that is
known is bi***@microsoft .com.

--
;-),

Kevin Spencer
Microsoft MVP
.Net Developer
Neither a follower nor a lender be.

Nov 19 '05 #17
"fd123456" <fd******@hotma il.com> wrote in message
news:c8******** *************** ***@posting.goo gle.com...
You're absolutely welcome, Tom.

Proceed as you feel. In the end, if you manage to grab a non-demo
version of VS, I'm quite sure you'll put DW where it belongs : the
fond memories shelf.
I don't thinks so. But I expect to use both. I don't use a lot of DW's
features because I don't want to be locked into it's proprietary way of
doing things (same as VS). Just from looking at both (granted I just
started with VS), I like DW much better for working with the Design side.
Also, even in DW I tend to work in the Code page and write (or copy and
paste) my objects instead of using DW's wizards to add the objects to the
page. I tend to be a more hands on type of person.

Even with using Word and DW, I use Textpad (editor) to do some of my stuff.

Each has it's own features I like.
By the way, the site that helped me the most when I started asp.net is
http://www.asp.net/tutorials/quickstart.aspx. You might want to check
it.
I will look at it.

Thanks,

Tom
Have fun !

Michel
"tshad" <ts**********@f tsolutions.com> wrote in message
news:<uC******* *******@TK2MSFT NGP10.phx.gbl>. ..
Michel,

Thanks for the info.

I think I will probably use VS to build classes (such as myUtils that are
not page specific) and Globals.asax, but as you say trying to use my
other
pages in VS would be quite difficult. I am sure I would have the same
problem if I went from VS to DW.

I will probably look at using code-behind to allow someone to do some of
the
design, but I will probably not compile it. I'll know better once I have
worked with it more.

Thanks for all the help,

Tom.

Nov 19 '05 #18
As an aside, I looked at the MS ASP.Net site you mentioned and all the
samples I looked at were code-beside.

Why?

Because it is easier to read.

Remember, one of the arguments for code-behind was that it was easier to
read. I just thought it was interesting that MS chose to use code-beside
for its tutorials :)

Tom
"tshad" <ts**********@f tsolutions.com> wrote in message
news:eR******** ******@TK2MSFTN GP12.phx.gbl...
"fd123456" <fd******@hotma il.com> wrote in message
news:c8******** *************** ***@posting.goo gle.com...
You're absolutely welcome, Tom.

Proceed as you feel. In the end, if you manage to grab a non-demo
version of VS, I'm quite sure you'll put DW where it belongs : the
fond memories shelf.


I don't thinks so. But I expect to use both. I don't use a lot of DW's
features because I don't want to be locked into it's proprietary way of
doing things (same as VS). Just from looking at both (granted I just
started with VS), I like DW much better for working with the Design side.
Also, even in DW I tend to work in the Code page and write (or copy and
paste) my objects instead of using DW's wizards to add the objects to the
page. I tend to be a more hands on type of person.

Even with using Word and DW, I use Textpad (editor) to do some of my
stuff.

Each has it's own features I like.

By the way, the site that helped me the most when I started asp.net is
http://www.asp.net/tutorials/quickstart.aspx. You might want to check
it.


I will look at it.

Thanks,

Tom

Have fun !

Michel
"tshad" <ts**********@f tsolutions.com> wrote in message
news:<uC******* *******@TK2MSFT NGP10.phx.gbl>. ..
Michel,

Thanks for the info.

I think I will probably use VS to build classes (such as myUtils that
are
not page specific) and Globals.asax, but as you say trying to use my
other
pages in VS would be quite difficult. I am sure I would have the same
problem if I went from VS to DW.

I will probably look at using code-behind to allow someone to do some of
the
design, but I will probably not compile it. I'll know better once I
have
worked with it more.

Thanks for all the help,

Tom.


Nov 19 '05 #19
I believe they're code-beside because of the MS policy to provide "a
full development solution for free", meaning that you *can* write
programs for the .net platform for free using only Notepad if you
want. So, those examples cater for both types of users.

Again, my view on this is that if you own VS and are using it
properly, you can code several times faster and work on very very
complex projects (N-tier, security, auto-reconfigurable, the works),
where code is more important (in size) than design. It's not a matter
of coding practice or design, or programming quality, or even
programmer quality, it's just a matter of using a fantastic IDE that
grows on you. You can write macros and assign keystrokes to them,
which means you can type method or properties stubs in one keystroke.

The hassle of maintaining two different files for each page disappears
with VS, because going from one to the other is completely handled by
VS, as is the creation of all necessary bits of code, like
"codebehind=myP age.aspx.vb" or "inherits=myPag e.vb". Note that I
originally started by writing Windows programs, not Internet ones.
Hence VS.

But I am fully aware, contrarily to some here, that my love is
threefold : I love .net because of the richness of the libraries, I
love c# for it's sheer beauty and I love VS as an IDE for the ease of
use.

At the very start of this thread - a month ago, can you believe it? -
you asked some questions about the structure of the pages for asp.net,
so I decided to share my passion for asp.net with you. In no way am I
going to force you into loving c# or the IDE, that's entirely up to
you, although at one point I had to explain what was the relation
between a page and it's codebehind because the example I had provided
was written with the IDE.

You seem to be rather intent on using DW and Textpad to code, and
there's nothing wrong with that on my end. I'll try my best to provide
you with examples you can use.

I'm not saying all this to you in particular, because I think you
understand all this already, but to those who would be tempted to
force you into practices you don't want. Maybe I should have posted
this in the other thread. Oh well.

All the best,

Michel
"tshad" <ts**********@f tsolutions.com> wrote in message news:<eB******* *******@TK2MSFT NGP12.phx.gbl>. ..
As an aside, I looked at the MS ASP.Net site you mentioned and all the
samples I looked at were code-beside.

Why?

Because it is easier to read.

Remember, one of the arguments for code-behind was that it was easier to
read. I just thought it was interesting that MS chose to use code-beside
for its tutorials :)

Tom
"tshad" <ts**********@f tsolutions.com> wrote in message
news:eR******** ******@TK2MSFTN GP12.phx.gbl...
"fd123456" <fd******@hotma il.com> wrote in message
news:c8******** *************** ***@posting.goo gle.com...
You're absolutely welcome, Tom.

Proceed as you feel. In the end, if you manage to grab a non-demo
version of VS, I'm quite sure you'll put DW where it belongs : the
fond memories shelf.


I don't thinks so. But I expect to use both. I don't use a lot of DW's
features because I don't want to be locked into it's proprietary way of
doing things (same as VS). Just from looking at both (granted I just
started with VS), I like DW much better for working with the Design side.
Also, even in DW I tend to work in the Code page and write (or copy and
paste) my objects instead of using DW's wizards to add the objects to the
page. I tend to be a more hands on type of person.

Even with using Word and DW, I use Textpad (editor) to do some of my
stuff.

Each has it's own features I like.

By the way, the site that helped me the most when I started asp.net is
http://www.asp.net/tutorials/quickstart.aspx. You might want to check
it.


I will look at it.

Thanks,

Tom

Have fun !

Michel
"tshad" <ts**********@f tsolutions.com> wrote in message
news:<uC******* *******@TK2MSFT NGP10.phx.gbl>. ..
Michel,

Thanks for the info.

I think I will probably use VS to build classes (such as myUtils that
are
not page specific) and Globals.asax, but as you say trying to use my
other
pages in VS would be quite difficult. I am sure I would have the same
problem if I went from VS to DW.

I will probably look at using code-behind to allow someone to do some of
the
design, but I will probably not compile it. I'll know better once I
have
worked with it more.

Thanks for all the help,

Tom.


Nov 19 '05 #20

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
15872
by: Tom Bates | last post by:
Possible? It seems nobody knows how... :-) Tom
1
280
by: fd123456 | last post by:
Hi tshad, sorry for not coming back to you earlier. When I meant to add a method to Global.asax, I actually meant to add it to the code-behind file. If you click on "Global.asax" in the file explorer, then on the F7 key, you can edit this code-behind; that's the one that includes the Application_Start, Application_BeginRequest, etc, routines (I don't even know where you added the <script> bit). In this file, you can add your own...
1
2240
by: | last post by:
Hi all, Is it possible to have custom function/subroutines in global.asax? e.g. DoMyWork(i as integer) etc etc. If yes, how can I access this code in my ..aspx pages? I know I can put this into a seperate dll in the bin directory, but to keep it simple global.asax would be nice too.. TIA!
7
3004
by: Microsoft | last post by:
I'm not sure where to physically place my subroutines in vb.net I get namespace and not declared errors... Imports System Imports System.Management Public Class Form1
2
1891
by: Christoph Haas | last post by:
Evening, I'm currently working on a larger Python project that consists of multiple programs and packages. As I need a few utility functions time and again I moved them all into a Utility package and created a class there. Like this: Util.py: ~~~~~~~~ class Util: def __init__(self, debugFlag=False, vibranceLevel='good'):
1
2263
by: u0107 | last post by:
Hello, I am developing a website with an MS-Access backend database. One of the tables in the database is tblUser. On accessing my website, a user is required to provide a valid user id and a password. Once a user id and password is provided, it is validated against appropriate fields in tblUser and a "logged in" flag (another field in tblUser) is set to "True". I want to set the flag to "False" at the end of the session. Session...
11
3166
by: eBob.com | last post by:
I have this nasty problem with Shared methods and what I think of as "global storage" - i.e. storage declared outside of any subroutines or functions. In the simple example below this "global" storage is ButtonHasBeenClicked. In this simple example code in Form1 calls a routine in Module1 which then calls code back in Form1 (subroutine WhatEver). WhatEver needs to access ButtonHasBeenClicked but the reference to ButtonHasBeenClicked...
2
2358
by: David Morgan | last post by:
Hi Guys I have been working with ASP for many years but have _never_ come across this. Sure, I've had the global.asa not execute because of application misconfiguration, but check this out... Server (W2K3 R2) reboots, website comes back up, but no application variables loaded. What makes it even more bizarre is that the variables that are set in
0
9643
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9480
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10147
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
7494
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6737
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5379
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4044
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2877
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.