Discussion:
Website Project vs. Web Application Project in Visual Studio.net 2005
Eron Armour
2008-03-03 16:47:26 UTC
Permalink
Smotritsky, Alex
2008-03-03 16:51:54 UTC
Permalink
Brock Allen
2008-03-03 17:09:04 UTC
Permalink
Shawn Wildermuth
2008-03-03 19:36:33 UTC
Permalink
Dean Cleaver
2008-03-03 20:00:46 UTC
Permalink
Bob Franken
2008-03-03 20:33:22 UTC
Permalink
I divide a site into multiple web app projects. Then copy the separate dlls into the bin dir. It can be tricky, but using separate classes for business logic helps.

This helps load times for visual studio.


Sent via BlackBerry from T-Mobile

-----Original Message-----
From: Dean Cleaver <***@XCEPTIONSOFTWARE.COM>

Date: Tue, 4 Mar 2008 09:00:46
To:DOTNET-***@DISCUSS.DEVELOP.COM
Subject: Re: [DOTNET-WEB] Website Project vs. Web Application Project in Visual Studio.net 2005


I'm looking the other way for easier development - currently our web app
is in excess of 100 folders just in the root and it's becoming too big
to manage. I'm trying to see if there's a way we can develop these
folders in pairs (there's 55 sets of Admin and Secure folder pairs, plus
their image folders etc) such that the project I am working on is only 4
or 5 folders, and each staff member can be working on a different pair
of folders. We may still need a behemoth project to actually deploy it,
but would make development easier.

Dino

-----Original Message-----
From: Discussion of building .NET applications targeted for the Web
[mailto:DOTNET-***@DISCUSS.DEVELOP.COM] On Behalf Of Shawn Wildermuth
Sent: Tuesday, 4 March 2008 08:37
To: DOTNET-***@DISCUSS.DEVELOP.COM
Subject: Re: [DOTNET-WEB] Website Project vs. Web Application Project in
Visual Studio.net 2005

I find that Web Apps are clearer to deploy. The magic "ASP" style of
drop a
file and have the server compile it frustrates me...I want to only
deploy
???x files and the bin folder.

Thanks,

Shawn Wildermuth
http://adoguy.com
http://wildermuthconsulting.com
http://geekdinners.com
Microsoft MVP (C#), MCSD.NET, Author and Speaker

The Silverlight Tour is coming to a city near you!

-----Original Message-----
From: Discussion of building .NET applications targeted for the Web
[mailto:DOTNET-***@DISCUSS.DEVELOP.COM] On Behalf Of Brock Allen
Sent: Monday, March 03, 2008 12:09 PM
To: DOTNET-***@DISCUSS.DEVELOP.COM
Subject: Re: [DOTNET-WEB] Website Project vs. Web Application Project in
Visual Studio.net 2005

> Website Project: how do you set up the project to use a bin directory
> and compile and place the .dll within?

You would need to precompile your application. This can be done from
aspnet_compiler.exe or from the "Publish Website" menu option. If you
choose
the latter, make sure you uncheck the 'Allow this site to be updatable'
as
that still leaves your .aspx/.ascx/.master/.ashx files uncompiled.

-Brock

===================================
This list is hosted by DevelopMentor. http://www.develop.com

View archives and manage your subscription(s) at
http://discuss.develop.com

===================================
This list is hosted by DevelopMentor(r) http://www.develop.com

View archives and manage your subscription(s) at
http://discuss.develop.com

===================================
This list is hosted by DevelopMentor® http://www.develop.com

View archives and manage your sub
Dean Cleaver
2008-03-04 02:37:07 UTC
Permalink
Scott Guthrie
2008-03-04 02:56:01 UTC
Permalink
Mark Gregory
2008-03-13 05:05:54 UTC
Permalink
Miika Makinen
2008-03-13 06:52:40 UTC
Permalink
Mark,
I believe what you are looking for survey framework? You can find plenty in
Google, like http://www.dotnetgoodies.com/survey_builder.aspx

Haven't used these myself though...

On 3/13/08, Mark Gregory <***@gt.com.au> wrote:
>
> I would appreciate knowing if there is anything that will permit forms
> (reports) to be created in a web page.
>
> My client would like to be able to move controls around a page, then
> save the layout. The form would then be used to enter data and print out
> as a report.
>
> The solution cannot have any win form components or requirements as this
> has to be something that the user can do over the web.
>
> Regards, Mark
>
> ===================================
> This list is hosted by DevelopMentor(R) http://www.develop.com
>
> View archives and manage your subscription(s) at
> http://discuss.develop.com
>

===================================
This list is hosted by DevelopMentor® http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com
Richard Howells
2008-03-13 09:15:49 UTC
Permalink
You can do this kind of thing with WebParts.

http://msdn2.microsoft.com/en-us/library/e0s9t4ck.aspx


Cheers,

- Richard
***@dynamisys.co.uk
www.dynamisys.co.uk
(T) +44 (0) 1793 731225
(M) +44 (0) 773 297 1786

-----Original Message-----
From: Discussion of building .NET applications targeted for the Web
[mailto:DOTNET-***@DISCUSS.DEVELOP.COM] On Behalf Of Mark Gregory
Sent: 13 March 2008 05:06
To: DOTNET-***@DISCUSS.DEVELOP.COM
Subject: [DOTNET-WEB] Web based report or form designer

I would appreciate knowing if there is anything that will permit forms
(reports) to be created in a web page.

My client would like to be able to move controls around a page, then
save the layout. The form would then be used to enter data and print out
as a report.

The solution cannot have any win form components or requirements as this
has to be something that the user can do over the web.

Regards, Mark

===================================
This list is hosted by DevelopMentor. http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

No virus found in this incoming message.
Checked by AVG.
Version: 7.5.518 / Virus Database: 269.21.7/1325 - Release Date: 11/03/2008
13:41


No virus found in this outgoing message.
Checked by AVG.
Version: 7.5.518 / Virus Database: 269.21.7/1325 - Release Date: 11/03/2008
13:41

===================================
This list is hosted by DevelopMentor® http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com
Mark Gregory
2008-03-18 01:57:16 UTC
Permalink
Dean Cleaver
2008-03-18 16:53:41 UTC
Permalink
Dean Cleaver
2008-04-03 09:30:20 UTC
Permalink
Efran Cobisi
2008-04-03 10:01:36 UTC
Permalink
Adding the handler to your DropDownList's SelectedIndexChanged event in
the Render phase should bee too late for the framework to take it into
account properly.
Add it while being in the Init phase instead, just before adding the
DropDownList to the Controls collection; that should make the trick.


protected override void OnInit(EventArgs e)
{
Controls.Clear();

// Setup children's events handlers

this.DropDownList.SelectedIndexChanged +=
DropDownList_SelectedIndexChanged;

Controls.Add(this.TextBox);
Controls.Add(this.DropDownList);
}


HTH

--
Efran Cobisi
http://www.cobisi.com

Dean Cleaver wrote:
> I've tried to create a control that can be either a TextBox or a
> DropDownList, but am having trouble "bubbling" the SelectedIndexChanged
> event for the DropDownList (within an UpdatePanel if that makes any
> difference). My code is like this (snipped a bit for brevity) - is there
> something obvious I am missing?
>
> Dino
>
>
>
> using System;
> using System.ComponentModel;
> using System.Data;
> using System.Security.Permissions;
> using System.Web;
> using System.Web.UI;
> using System.Web.UI.WebControls;
> using AjaxControlToolkit;
>
> namespace Client.Project.WebControls
> {
> [
> DefaultEvent("SelectedIndexChanged"),
> DefaultProperty("Text"),
> ToolboxData("<{0}:DetailInputBox runat=\"server\">
> </{0}:DetailInputBox>"),
> ]
> public class DetailInputBox : WebControl, IPostBackEventHandler
> {
> protected override void OnInit(EventArgs e)
> {
> Controls.Clear();
>
> Controls.Add(this.TextBox);
> Controls.Add(this.DropDownList);
> }
>
> protected override void Render(HtmlTextWriter writer)
> {
> if (this.IsValid || this.ReadOnly)
> writer.WriteLine("<div class=\"detailBlock\">");
> else
> writer.WriteLine("<div class=\"detailBlockError\">");
>
> writer.WriteLine(" <div class=\"detailInput\">");
>
> if (this.DropDownList.Items.Count > 0)
> {
> this.DropDownList.SelectedIndexChanged +=
> DropDownList_SelectedIndexChanged;
> this.DropDownList.RenderControl(writer);
> }
> else
> this.TextBox.RenderControl(writer);
>
> writer.WriteLine(" </div>");
> writer.WriteLine(" <div class=\"clear\"></div>");
> writer.WriteLine("</div>");
> }
>
> [Browsable(false),]
> private TextBox textBox = null;
> /// <summary>
> /// Gets or sets the required text box validator.
> /// </summary>
> /// <value>The required text box validator.</value>
> private TextBox TextBox
> {
> get
> {
> if (textBox == null)
> {
> textBox = new TextBox();
> textBox.ID = this.ID + "Text";
> }
> return textBox;
> }
> }
>
> [Browsable(false),]
> private DropDownList dropDownList = null;
> /// <summary>
> /// Gets or sets the required text box validator.
> /// </summary>
> /// <value>The required text box validator.</value>
> public DropDownList DropDownList
> {
> get
> {
> if (dropDownList == null)
> {
> dropDownList = new DropDownList();
> dropDownList.ID = this.ID + "List";
> }
> return dropDownList;
> }
> }
>
> private bool isValid = true;
> [Browsable(false)]
> public bool IsValid
> {
> get { return this.isValid; }
> set { this.isValid = value; }
> }
>
> [
> Description("The Details Fields ValidationGroup"),
> Category("Custom Properties"),
> ]
> public string ValidationGroup
> {
> get { return this.TextBox.ValidationGroup; }
> set
> {
> this.TextBox.ValidationGroup = value;
> this.DropDownList.ValidationGroup = value;
> }
> }
>
> public ListItemCollection Items
> {
> get { return this.DropDownList.Items; }
> }
>
> public string SelectedValue
> {
> get { return this.DropDownList.SelectedValue; }
> }
>
> public int SelectedIndex
> {
> get { return this.DropDownList.SelectedIndex; }
> set { this.DropDownList.SelectedIndex = value; }
> }
>
> void DropDownList_SelectedIndexChanged(object sender, EventArgs
> e)
> {
> this.OnSelectedIndexChanged(e);
> }
>
> public event EventHandler SelectedIndexChanged;
>
> protected virtual void OnSelectedIndexChanged(EventArgs args)
> {
> EventHandler thisEvent = this.SelectedIndexChanged;
>
> if (thisEvent != null)
> thisEvent(this, args);
> }
>
> public bool AutoPostBack
> {
> get { return this.DropDownList.AutoPostBack; }
> set
> {
> this.TextBox.AutoPostBack = value;
> this.DropDownList.AutoPostBack = value;
> }
> }
>
> public void RaisePostBackEvent(string eventArgument)
> {
> this.OnSelectedIndexChanged(EventArgs.Empty);
> }
> }
> }
>
> ===================================
> This list is hosted by DevelopMentor® http://www.develop.com
>
> View archives and manage your subscription(s) at http://discuss.develop.com
>

===================================
This list is hosted by DevelopMentor® http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com
Dean Cleaver
2008-04-03 10:44:52 UTC
Permalink
Mark Aurit
2008-04-21 13:34:10 UTC
Permalink
Where is the best place to test in asp.net apps that values placed in
state still exist (the person walking away from their browser after
logging in thing)? Putting the check in the masterpage seemed ideal, but
the page events fire first, so that isn’t a lot of help. Should I put
the validation into a base page inherited by each page? Or each page’s
Page_Load event? There is a lot of expertise here, I would like to hear
the best practices.

Thanks, Mark

===================================
This list is hosted by DevelopMentor® http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com
Ryan Heath
2008-04-21 14:00:13 UTC
Permalink
With state, you meant Session, no?

With Session[key] != null you can check *everywhere* whether your
state is still available.
Where the *best place* is, depends on your architecture...

HTH
// Ryan

On Mon, Apr 21, 2008 at 3:34 PM, Mark Aurit <***@gmail.com> wrote:
> Where is the best place to test in asp.net apps that values placed in
> state still exist (the person walking away from their browser after
> logging in thing)? Putting the check in the masterpage seemed ideal, but
> the page events fire first, so that isn't a lot of help. Should I put
> the validation into a base page inherited by each page? Or each page's
> Page_Load event? There is a lot of expertise here, I would like to hear
> the best practices.
>
> Thanks, Mark
>
> ===================================
> This list is hosted by DevelopMentor(R) http://www.develop.com
>
> View archives and manage your subscription(s) at http://discuss.develop.com
>

===================================
This list is hosted by DevelopMentor® http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com
Mark Aurit
2008-04-21 14:13:09 UTC
Permalink
Session works, any mechanism that uses some type of non-persistent storage.
I realize I could check of the value being null behind every attempt to
do anything to do anything with a value
in session, but that would bulk up my code. Im just wondering if there
isnt another method, along the lines of those mentioned below, where I
can do it once and forget about it. Perhaps that's unrealistic, or
perhaps every time I attempt to access such a value it should be through
a wrapper that first does the state check.
I wanted to see how those doing real world apps are approaching this
common problem.

Ryan Heath wrote:
> With state, you meant Session, no?
>
> With Session[key] != null you can check *everywhere* whether your
> state is still available.
> Where the *best place* is, depends on your architecture...
>
> HTH
> // Ryan
>
> On Mon, Apr 21, 2008 at 3:34 PM, Mark Aurit <***@gmail.com> wrote:
>
>> Where is the best place to test in asp.net apps that values placed in
>> state still exist (the person walking away from their browser after
>> logging in thing)? Putting the check in the masterpage seemed ideal, but
>> the page events fire first, so that isn't a lot of help. Should I put
>> the validation into a base page inherited by each page? Or each page's
>> Page_Load event? There is a lot of expertise here, I would like to hear
>> the best practices.
>>
>> Thanks, Mark
>>
>> ===================================
>> This list is hosted by DevelopMentor(R) http://www.develop.com
>>
>> View archives and manage your subscription(s) at http://discuss.develop.com
>>
>>
>
> ===================================
> This list is hosted by DevelopMentor® http://www.develop.com
>
> View archives and manage your subscription(s) at http://discuss.develop.com
>
>

===================================
This list is hosted by DevelopMentor® http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com
Efran Cobisi
2008-04-21 15:51:56 UTC
Permalink
> Putting the check in the masterpage seemed ideal, but
> the page events fire first, so that isn’t a lot of help.
Better not; doing so would require every page needing to access your
session items would either have that masterpage applied or break the
incapsulation logic behind that.
> Should I put
> the validation into a base page inherited by each page?
This is my preferred approach; one base page for each project I develop
for. This one would allow for future base page enhancements as well,
encouraging polymorphism, inheritance and encapsulation.

HTH

--
Efran Cobisi
http://www.cobisi.com

===================================
This list is hosted by DevelopMentor® http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com
Mark Aurit
2008-04-21 16:06:49 UTC
Permalink
Thanks much. What event do you suggest I put it in?

Efran Cobisi wrote:
>> Putting the check in the masterpage seemed ideal, but
>> the page events fire first, so that isn’t a lot of help.
> Better not; doing so would require every page needing to access your
> session items would either have that masterpage applied or break the
> incapsulation logic behind that.
>> Should I put
>> the validation into a base page inherited by each page?
> This is my preferred approach; one base page for each project I develop
> for. This one would allow for future base page enhancements as well,
> encouraging polymorphism, inheritance and encapsulation.
>
> HTH
>
> --
> Efran Cobisi
> http://www.cobisi.com
>
> ===================================
> This list is hosted by DevelopMentor® http://www.develop.com
>
> View archives and manage your subscription(s) at
> http://discuss.develop.com
>

===================================
This list is hosted by DevelopMentor® http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com
Efran Cobisi
2008-04-21 16:08:44 UTC
Permalink
> Thanks much. What event do you suggest I put it in?
Usually I tend to override the OnPreInit() method and, after calling its
base, do every session check I need to. Naturally, this would work only
starting from ASP.NET version 2.0.

HTH

--
Efran Cobisi
http://www.cobisi.com

===================================
This list is hosted by DevelopMentor® http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com
Mark Aurit
2008-04-21 16:33:54 UTC
Permalink
Would that fire every time a button is clicked, or only before
page_load? In other words, if the form was filled out, the user has a
cup of coffee, wanders back and clicks the submit button, am I covered?

Efran Cobisi wrote:
>> Thanks much. What event do you suggest I put it in?
> Usually I tend to override the OnPreInit() method and, after calling its
> base, do every session check I need to. Naturally, this would work only
> starting from ASP.NET version 2.0.
>
> HTH
>
> --
> Efran Cobisi
> http://www.cobisi.com
>
> ===================================
> This list is hosted by DevelopMentor® http://www.develop.com
>
> View archives and manage your subscription(s) at
> http://discuss.develop.com
>

===================================
This list is hosted by DevelopMentor® http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com
Efran Cobisi, cobisi.com
2008-04-21 17:41:10 UTC
Permalink
> Would that fire every time a button is clicked, or only before
> page_load?
Sure, it would fire every time the page is initialized. This includes
post backs too. Your question is misleading, however, because the Load
event would fire every time too; in both cases you could check for the
IsPostback page property to determine if the page has been posted back
or not.

> In other words, if the form was filled out, the user has a
> cup of coffee, wanders back and clicks the submit button, am I covered?

Well, it depends on the quality of the coffee. ;)
To answer your question, yes, the PreInit event fires every time the
page is processed.

HTH

--
Efran Cobisi
http://www.cobisi.com

===================================
This list is hosted by DevelopMentor® http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com
Per Bolmstedt
2008-04-21 13:54:58 UTC
Permalink
On Mon, 21 Apr 2008 06:34:10 -0700, Mark Aurit <***@GMAIL.COM> wrote:

> Where is the best place to test in asp.net apps that values placed in
> state still exist (the person walking away from their browser after
> logging in thing)?

What exactly are you checking, and why? The "session" is normally handled
automatically by ASP.NET, and anything you add to the "session state" will
stay there until the session itself is torn down because of (for example) a
session timeout (person walks away for 20 minutes). You rarely need to check
explicitly for the "existence of a session" - if the session has expired,
the user will no longer be able to access restricted pages, for example.
(All this, of course, assumes you're using ASP.NET to manage session, state,
security, etc.)

===================================
This list is hosted by DevelopMentor® http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com
Mark Aurit
2008-04-21 14:18:18 UTC
Permalink
What exactly are you checking, and why?
>>> Key values; for example the id of the person logged in which used
throughout the app for audit logging.

The "session" is normally handledautomatically by ASP.NET, and anything
you add to the "session state" will
> stay there until the session itself is torn down because of (for example) a
> session timeout (person walks away for 20 minutes). You rarely need to check
> explicitly for the "existence of a session" - if the session has expired,
> the user will no longer be able to access restricted pages, for example.
> (All this, of course, assumes you're using ASP.NET to manage session, state,
> security, etc.)
>>> Lets assume Im not. That if the session has expired the key value
is gone and attempts to use it to log blow up.

===================================
This list is hosted by DevelopMentor® http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com
Brock Allen
2008-04-23 13:52:06 UTC
Permalink
Efran Cobisi
2008-04-21 15:44:52 UTC
Permalink
>
> You rarely need to check
> explicitly for the "existence of a session" - if the session has expired,
> the user will no longer be able to access restricted pages, for example.

This is not correct, since the ASP.NET forms authentication ticket does
not depend upon the session cookie and vice versa. It is not so uncommon
to see web sites configurations where the former is allowed to span for
many days while the latter is restricted to 20 minutes at most.

HTH

--
Efran Cobisi
http://www.cobisi.com

===================================
This list is hosted by DevelopMentor® http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com
Per Bolmstedt
2008-04-21 14:29:33 UTC
Permalink
On Mon, 21 Apr 2008 07:18:18 -0700, Mark Aurit <***@GMAIL.COM> wrote:

> > What exactly are you checking, and why?
>
> Key values; for example the id of the person logged in which
> used throughout the app for audit logging.

Well, this is what I was talking about. The most common real-world solution
to this is to restrict your web application to authenticated users (deny=?).
This means from a page in the restricted location you can always rely on the
"current user name" to be defined.

If you have session/state stuff which you don't want to be null, how about
initializing all that when a session starts? This means it will be handled
automatically. For example, set Session["NumberOfPagesViewed"]=0 when a
session is created, and you can then henceforth rely on the value being
non-null.

===================================
This list is hosted by DevelopMentor® http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com
Continue reading on narkive:
Loading...