Showing posts with label website. Show all posts
Showing posts with label website. Show all posts

Thursday, March 22, 2012

Structure of website

Hi all,

using 1.1

I am creating a dynamic menu structure for my site, however, I may refer to
the structure many times within a page. This would be fine if I was doing it
all in the codebehind of the page, but I am trying to create seperate tiers
for seperate areas. The menu structure I suppose is a middle tier...

The menu is built using a recursive function to build the tree. My page
would normally call a seperate class and function to build the menu. This
would effectively mean that every time I wanted to use the menu in whatever
classes elsewhere in my page, I would have to create the menu from scratch
again to work with it.

This is what I am trying to avoid, as it can be an expensive process to call
the database for every operation.

To throw more confusion into the pot, my page codebehind is derived from my
own class, which is in turn derived from system.web.ui.page. This means that
the codebehind for the page itself has very little code in it, all the work
being done in my derived class.

On the page itself, I have custom controls and user controls. The user
controls also work like the pages where the codebehind is derived from my
derived class, which derives from usercontrol. The custom and user controls
must also be able to work with the menu class.

Where would be the best place to set up the initial menu, so that my derived
page, the page codebehind and my controls can all interact with it, without
having to build the menu each time?

Thanks for your time. If this is a little confusing, please ask me to
attempt to make it clearer.

Best regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises availableHi,

I am guessing that I didn't phrase this question easily...

Basically, I want to have a base class that on the first call to the page,
creates and populates a menu object.

When I need to refer to the menu at any time within the page (such as
creating a menu tree or finding which page I am on through following the menu
tree, or creating a breadcrumb trail), I don't want to have to create a menu
class for each instance.

What may add to the confusion is that my page, user controls and custom
controls derive from my own base classes, so there is an extra layer of
confusion. I would like my page base class to be able to know about the menu
(which can pass it to the page class), and my UCs base class to know about
it, which can pass to the UC codebehind.

I don't mind creating the menu for each page, but I really only want to
create it once, because it uses a database call, I don't want to have an
expensive process for each use of it.

All help is appreciated.

Regards,
Dave Colliver.
http://www.DerbyFOCUS.com
~~
http://www.FOCUSPortals.com - Portal franchises available

"David" wrote:

Quote:

Originally Posted by

Hi all,
>
using 1.1
>
I am creating a dynamic menu structure for my site, however, I may refer to
the structure many times within a page. This would be fine if I was doing it
all in the codebehind of the page, but I am trying to create seperate tiers
for seperate areas. The menu structure I suppose is a middle tier...
>
The menu is built using a recursive function to build the tree. My page
would normally call a seperate class and function to build the menu. This
would effectively mean that every time I wanted to use the menu in whatever
classes elsewhere in my page, I would have to create the menu from scratch
again to work with it.
>
This is what I am trying to avoid, as it can be an expensive process to call
the database for every operation.
>
To throw more confusion into the pot, my page codebehind is derived from my
own class, which is in turn derived from system.web.ui.page. This means that
the codebehind for the page itself has very little code in it, all the work
being done in my derived class.
>
On the page itself, I have custom controls and user controls. The user
controls also work like the pages where the codebehind is derived from my
derived class, which derives from usercontrol. The custom and user controls
must also be able to work with the menu class.
>
Where would be the best place to set up the initial menu, so that my derived
page, the page codebehind and my controls can all interact with it, without
having to build the menu each time?
>
Thanks for your time. If this is a little confusing, please ask me to
attempt to make it clearer.
>
Best regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available
>
>
>


Hi all,

I am really struggling with this still. Any help would be appreciated...

I don't know if this will work, I am thinking along the lines of ...

In my base page, in the page_init (override), create a new instance of the
class that calls the database for the menu, and create the menu structure
into a dataset (or my own structure)

Then, in my controls (or even the page itself), open the dataset (or my own
structure) that has been created from the base page.

So, for example, I have a data layer... if I have a property in the
datalayer class that stores my dataset, that I populate on the page_init,
when I come to use it in the controls, can I do something as simple as...

MyMenu = this.Menu as MyClass.Menu;

(I am using c#, .net 1.1)

Will it then access the already created Menu?

If it is likely to work, I am not sure of the way to code it. Any help here
is appreciated.

If you don't think it will work the way outlined above, but know of another
way, again, any help is appreciated.

The idea is to just call the database once for something that is likely to
be expensive to create. I don't need it on application or session level.
Page level will be fine. The problem with application or session level is
that if any changes are made to the menu structure, they won't be visible
until it has timed out.

Thanks for your time.

Best regards,
Dave Colliver.
http://www.CardiffFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available

"David Colliver" <DavidColliver@.discussions.microsoft.comwrote in message
news:FA252579-0E4C-41FD-979D-171CA8DB9E8F@.microsoft.com...

Quote:

Originally Posted by

Hi,
>
I am guessing that I didn't phrase this question easily...
>
Basically, I want to have a base class that on the first call to the page,
creates and populates a menu object.
>
When I need to refer to the menu at any time within the page (such as
creating a menu tree or finding which page I am on through following the
menu
tree, or creating a breadcrumb trail), I don't want to have to create a
menu
class for each instance.
>
What may add to the confusion is that my page, user controls and custom
controls derive from my own base classes, so there is an extra layer of
confusion. I would like my page base class to be able to know about the
menu
(which can pass it to the page class), and my UCs base class to know about
it, which can pass to the UC codebehind.
>
I don't mind creating the menu for each page, but I really only want to
create it once, because it uses a database call, I don't want to have an
expensive process for each use of it.
>
All help is appreciated.
>
Regards,
Dave Colliver.
http://www.DerbyFOCUS.com
~~
http://www.FOCUSPortals.com - Portal franchises available
>
>
>
"David" wrote:
>

Quote:

Originally Posted by

>Hi all,
>>
>using 1.1
>>
>I am creating a dynamic menu structure for my site, however, I may refer
>to
>the structure many times within a page. This would be fine if I was doing
>it
>all in the codebehind of the page, but I am trying to create seperate
>tiers
>for seperate areas. The menu structure I suppose is a middle tier...
>>
>The menu is built using a recursive function to build the tree. My page
>would normally call a seperate class and function to build the menu. This
>would effectively mean that every time I wanted to use the menu in
>whatever
>classes elsewhere in my page, I would have to create the menu from
>scratch
>again to work with it.
>>
>This is what I am trying to avoid, as it can be an expensive process to
>call
>the database for every operation.
>>
>To throw more confusion into the pot, my page codebehind is derived from
>my
>own class, which is in turn derived from system.web.ui.page. This means
>that
>the codebehind for the page itself has very little code in it, all the
>work
>being done in my derived class.
>>
>On the page itself, I have custom controls and user controls. The user
>controls also work like the pages where the codebehind is derived from my
>derived class, which derives from usercontrol. The custom and user
>controls
>must also be able to work with the menu class.
>>
>Where would be the best place to set up the initial menu, so that my
>derived
>page, the page codebehind and my controls can all interact with it,
>without
>having to build the menu each time?
>>
>Thanks for your time. If this is a little confusing, please ask me to
>attempt to make it clearer.
>>
>Best regards,
>Dave Colliver.
>http://www.AshfieldFOCUS.com
>~~
>http://www.FOCUSPortals.com - Local franchises available
>>
>>
>>

Structure of website

Hi all,
using 1.1
I am creating a dynamic menu structure for my site, however, I may refer to
the structure many times within a page. This would be fine if I was doing it
all in the codebehind of the page, but I am trying to create seperate tiers
for seperate areas. The menu structure I suppose is a middle tier...
The menu is built using a recursive function to build the tree. My page
would normally call a seperate class and function to build the menu. This
would effectively mean that every time I wanted to use the menu in whatever
classes elsewhere in my page, I would have to create the menu from scratch
again to work with it.
This is what I am trying to avoid, as it can be an expensive process to call
the database for every operation.
To throw more confusion into the pot, my page codebehind is derived from my
own class, which is in turn derived from system.web.ui.page. This means that
the codebehind for the page itself has very little code in it, all the work
being done in my derived class.
On the page itself, I have custom controls and user controls. The user
controls also work like the pages where the codebehind is derived from my
derived class, which derives from usercontrol. The custom and user controls
must also be able to work with the menu class.
Where would be the best place to set up the initial menu, so that my derived
page, the page codebehind and my controls can all interact with it, without
having to build the menu each time?
Thanks for your time. If this is a little confusing, please ask me to
attempt to make it clearer.
Best regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises availableHi,
I am guessing that I didn't phrase this question easily...
Basically, I want to have a base class that on the first call to the page,
creates and populates a menu object.
When I need to refer to the menu at any time within the page (such as
creating a menu tree or finding which page I am on through following the men
u
tree, or creating a breadcrumb trail), I don't want to have to create a menu
class for each instance.
What may add to the confusion is that my page, user controls and custom
controls derive from my own base classes, so there is an extra layer of
confusion. I would like my page base class to be able to know about the menu
(which can pass it to the page class), and my UCs base class to know about
it, which can pass to the UC codebehind.
I don't mind creating the menu for each page, but I really only want to
create it once, because it uses a database call, I don't want to have an
expensive process for each use of it.
All help is appreciated.
Regards,
Dave Colliver.
http://www.DerbyFOCUS.com
~~
http://www.FOCUSPortals.com - Portal franchises available
"David" wrote:

> Hi all,
> using 1.1
> I am creating a dynamic menu structure for my site, however, I may refer t
o
> the structure many times within a page. This would be fine if I was doing
it
> all in the codebehind of the page, but I am trying to create seperate tier
s
> for seperate areas. The menu structure I suppose is a middle tier...
> The menu is built using a recursive function to build the tree. My page
> would normally call a seperate class and function to build the menu. This
> would effectively mean that every time I wanted to use the menu in whateve
r
> classes elsewhere in my page, I would have to create the menu from scratch
> again to work with it.
> This is what I am trying to avoid, as it can be an expensive process to ca
ll
> the database for every operation.
> To throw more confusion into the pot, my page codebehind is derived from m
y
> own class, which is in turn derived from system.web.ui.page. This means th
at
> the codebehind for the page itself has very little code in it, all the wor
k
> being done in my derived class.
> On the page itself, I have custom controls and user controls. The user
> controls also work like the pages where the codebehind is derived from my
> derived class, which derives from usercontrol. The custom and user control
s
> must also be able to work with the menu class.
> Where would be the best place to set up the initial menu, so that my deriv
ed
> page, the page codebehind and my controls can all interact with it, withou
t
> having to build the menu each time?
> Thanks for your time. If this is a little confusing, please ask me to
> attempt to make it clearer.
> Best regards,
> Dave Colliver.
> http://www.AshfieldFOCUS.com
> ~~
> http://www.FOCUSPortals.com - Local franchises available
>
>
Hi all,
I am really struggling with this still. Any help would be appreciated...
I don't know if this will work, I am thinking along the lines of ...
In my base page, in the page_init (override), create a new instance of the
class that calls the database for the menu, and create the menu structure
into a dataset (or my own structure)
Then, in my controls (or even the page itself), open the dataset (or my own
structure) that has been created from the base page.
So, for example, I have a data layer... if I have a property in the
datalayer class that stores my dataset, that I populate on the page_init,
when I come to use it in the controls, can I do something as simple as...
MyMenu = this.Menu as MyClass.Menu;
(I am using c#, .net 1.1)
Will it then access the already created Menu?
If it is likely to work, I am not sure of the way to code it. Any help here
is appreciated.
If you don't think it will work the way outlined above, but know of another
way, again, any help is appreciated.
The idea is to just call the database once for something that is likely to
be expensive to create. I don't need it on application or session level.
Page level will be fine. The problem with application or session level is
that if any changes are made to the menu structure, they won't be visible
until it has timed out.
Thanks for your time.
Best regards,
Dave Colliver.
http://www.CardiffFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available
"David Colliver" <DavidColliver@.discussions.microsoft.com> wrote in message
news:FA252579-0E4C-41FD-979D-171CA8DB9E8F@.microsoft.com...
> Hi,
> I am guessing that I didn't phrase this question easily...
> Basically, I want to have a base class that on the first call to the page,
> creates and populates a menu object.
> When I need to refer to the menu at any time within the page (such as
> creating a menu tree or finding which page I am on through following the
> menu
> tree, or creating a breadcrumb trail), I don't want to have to create a
> menu
> class for each instance.
> What may add to the confusion is that my page, user controls and custom
> controls derive from my own base classes, so there is an extra layer of
> confusion. I would like my page base class to be able to know about the
> menu
> (which can pass it to the page class), and my UCs base class to know about
> it, which can pass to the UC codebehind.
> I don't mind creating the menu for each page, but I really only want to
> create it once, because it uses a database call, I don't want to have an
> expensive process for each use of it.
> All help is appreciated.
> Regards,
> Dave Colliver.
> http://www.DerbyFOCUS.com
> ~~
> http://www.FOCUSPortals.com - Portal franchises available
>
> "David" wrote:
>

Tuesday, March 13, 2012

struggling asp.net novice

hi all

I am currently building an asp.net website for uni. I have a header ascx file with hyperlink buttons which i would like to be able to click on to bring up a list of categories which will be hyperlinks pulling up product data from my access database, i have been advised multidimentional arrays would be good, however i don't know where to start, can any body help?

thanks Angela

Crying [:'(]

Stuck with launching IE from Web App

PROBLEM # 1:
------
I am trying to launch a website in IE on the server from a C#/ASP.NET
web service. I am using the System.Diagnostics namespace and the
Process class methods. The IE process DOES seem to be running (since
there are IExplore.exe entries in the Task Manager), but no matter what
I do, there is no window on the screen (I cant see it). Here's the
code:

<code>
System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.StartInfo.FileName= @dotnet.itags.org."C:\Program Files\Internet
Explorer\IEXPLORE.exe";
proc.StartInfo.Arguments="http://www.mysite.com";
proc.StartInfo.CreateNoWindow = false;
proc.StartInfo.WindowStyle = ProcessWindowStyle.Maximized;
proc.Start();
</code
From what I've seen online, some ppl claimed to have done it
successfully while others said it is not possible to execute
applications from a web-based application (<a
href="http://www.dotnet247.com/247reference/msgs/20/103726.aspx">See
Here</a>). Can someone please confirm if it is really possible or not?

I do notice that all the IE processes in the Task Manager that my web
service "runs", the user is "NETWORK SERVICE", while the user for the IE
process that I manually open is "Administrator". Is this enough proof
that it is not possible. I would like to know how some ppl were able to
do it.

PROBLEM # 2
------
Well, the fact that the IE application does run in a hidden manner
(Problem # 1) is actually more preferable for me <b>IF</b> there is some
why that I can save the HTML file that is supposedly loaded into IE.
For example, if I could actually see the IE window, I would write a
script that would select FILE -> SAVE AS and so on...
However, without seeing the window, is there a way I can save the HTML
file being "displayed"?

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!check out this support link,
http://support.microsoft.com/defaul...kb;en-us;555134

"James N" <email_this_guy@.yahoo.com> wrote in message
news:#ssrBwuuEHA.3376@.TK2MSFTNGP12.phx.gbl...
> PROBLEM # 1:
> ------
> I am trying to launch a website in IE on the server from a C#/ASP.NET
> web service. I am using the System.Diagnostics namespace and the
> Process class methods. The IE process DOES seem to be running (since
> there are IExplore.exe entries in the Task Manager), but no matter what
> I do, there is no window on the screen (I cant see it). Here's the
> code:
> <code>
> System.Diagnostics.Process proc = new System.Diagnostics.Process();
> proc.StartInfo.FileName= @."C:\Program Files\Internet
> Explorer\IEXPLORE.exe";
> proc.StartInfo.Arguments="http://www.mysite.com";
> proc.StartInfo.CreateNoWindow = false;
> proc.StartInfo.WindowStyle = ProcessWindowStyle.Maximized;
> proc.Start();
> </code>
> From what I've seen online, some ppl claimed to have done it
> successfully while others said it is not possible to execute
> applications from a web-based application (<a
> href="http://links.10026.com/?link=http://www.dotnet247.com/247reference/msgs/20/103726.aspx">See
> Here</a>). Can someone please confirm if it is really possible or not?
> I do notice that all the IE processes in the Task Manager that my web
> service "runs", the user is "NETWORK SERVICE", while the user for the IE
> process that I manually open is "Administrator". Is this enough proof
> that it is not possible. I would like to know how some ppl were able to
> do it.
> PROBLEM # 2
> ------
> Well, the fact that the IE application does run in a hidden manner
> (Problem # 1) is actually more preferable for me <b>IF</b> there is some
> why that I can save the HTML file that is supposedly loaded into IE.
> For example, if I could actually see the IE window, I would write a
> script that would select FILE -> SAVE AS and so on...
> However, without seeing the window, is there a way I can save the HTML
> file being "displayed"?
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!
Thanks for your help. However, I already saw that MS article. And I
already tried it. It didn't work because I later realize that it's only
for II 5.0. IIS 6.0 uses a different worker process scheme. I havent
been able to find any similar article for II6 yet.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Stuck with launching IE from Web App

PROBLEM # 1:
--
I am trying to launch a website in IE on the server from a C#/ASP.NET
web service. I am using the System.Diagnostics namespace and the
Process class methods. The IE process DOES seem to be running (since
there are IExplore.exe entries in the Task Manager), but no matter what
I do, there is no window on the screen (I cant see it). Here's the
code:
<code>
System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.StartInfo.FileName= @dotnet.itags.org."C:\Program Files\Internet
Explorer\IEXPLORE.exe";
proc.StartInfo.Arguments="http://www.mysite.com";
proc.StartInfo.CreateNoWindow = false;
proc.StartInfo.WindowStyle = ProcessWindowStyle.Maximized;
proc.Start();
</code>
From what I've seen online, some ppl claimed to have done it
successfully while others said it is not possible to execute
applications from a web-based application (<a
href="http://www.dotnet247.com/247reference/msgs/20/103726.aspx">See
Here</a> ). Can someone please confirm if it is really possible or not?
I do notice that all the IE processes in the Task Manager that my web
service "runs", the user is "NETWORK SERVICE", while the user for the IE
process that I manually open is "Administrator". Is this enough proof
that it is not possible. I would like to know how some ppl were able to
do it.
PROBLEM # 2
--
Well, the fact that the IE application does run in a hidden manner
(Problem # 1) is actually more preferable for me <b>IF</b> there is some
why that I can save the HTML file that is supposedly loaded into IE.
For example, if I could actually see the IE window, I would write a
script that would select FILE -> SAVE AS and so on...
However, without seeing the window, is there a way I can save the HTML
file being "displayed"?
*** Sent via Developersdex http://www.examnotes.net ***
Don't just participate in USENET...get rewarded for it!check out this support link,
http://support.microsoft.com/defaul...kb;en-us;555134
"James N" <email_this_guy@.yahoo.com> wrote in message
news:#ssrBwuuEHA.3376@.TK2MSFTNGP12.phx.gbl...
> PROBLEM # 1:
> --
> I am trying to launch a website in IE on the server from a C#/ASP.NET
> web service. I am using the System.Diagnostics namespace and the
> Process class methods. The IE process DOES seem to be running (since
> there are IExplore.exe entries in the Task Manager), but no matter what
> I do, there is no window on the screen (I cant see it). Here's the
> code:
> <code>
> System.Diagnostics.Process proc = new System.Diagnostics.Process();
> proc.StartInfo.FileName= @."C:\Program Files\Internet
> Explorer\IEXPLORE.exe";
> proc.StartInfo.Arguments="http://www.mysite.com";
> proc.StartInfo.CreateNoWindow = false;
> proc.StartInfo.WindowStyle = ProcessWindowStyle.Maximized;
> proc.Start();
> </code>
> From what I've seen online, some ppl claimed to have done it
> successfully while others said it is not possible to execute
> applications from a web-based application (<a
> href="http://links.10026.com/?link=http://www.dotnet247.com/247reference/msgs/20/103726.aspx">See
> Here</a> ). Can someone please confirm if it is really possible or not?
> I do notice that all the IE processes in the Task Manager that my web
> service "runs", the user is "NETWORK SERVICE", while the user for the IE
> process that I manually open is "Administrator". Is this enough proof
> that it is not possible. I would like to know how some ppl were able to
> do it.
> PROBLEM # 2
> --
> Well, the fact that the IE application does run in a hidden manner
> (Problem # 1) is actually more preferable for me <b>IF</b> there is some
> why that I can save the HTML file that is supposedly loaded into IE.
> For example, if I could actually see the IE window, I would write a
> script that would select FILE -> SAVE AS and so on...
> However, without seeing the window, is there a way I can save the HTML
> file being "displayed"?
>
> *** Sent via Developersdex http://www.examnotes.net ***
> Don't just participate in USENET...get rewarded for it!
Thanks for your help. However, I already saw that MS article. And I
already tried it. It didn't work because I later realize that it's only
for II 5.0. IIS 6.0 uses a different worker process scheme. I havent
been able to find any similar article for II6 yet.
*** Sent via Developersdex http://www.examnotes.net ***
Don't just participate in USENET...get rewarded for it!