Click here to Skip to main content
15,914,074 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Datatable problem Pin
Abhijit Jana28-Jul-09 17:52
professionalAbhijit Jana28-Jul-09 17:52 
QuestionHow to bypass ISA Server programmatically? Pin
just3ala228-Jul-09 8:02
just3ala228-Jul-09 8:02 
QuestionWeb page is not runing!!!!! Pin
zeeShan anSari28-Jul-09 7:51
zeeShan anSari28-Jul-09 7:51 
AnswerRe: Web page is not runing!!!!! Pin
zeeShan anSari28-Jul-09 8:08
zeeShan anSari28-Jul-09 8:08 
AnswerRe: Web page is not runing!!!!! Pin
Abhijit Jana28-Jul-09 8:34
professionalAbhijit Jana28-Jul-09 8:34 
AnswerRe: Web page is not runing!!!!! Pin
N a v a n e e t h28-Jul-09 15:50
N a v a n e e t h28-Jul-09 15:50 
QuestionDesign using MVP pattern Pin
Cybernate28-Jul-09 5:15
Cybernate28-Jul-09 5:15 
AnswerRe: Design using MVP pattern Pin
Jeremy Likness28-Jul-09 9:22
professionalJeremy Likness28-Jul-09 9:22 
First, why should the presentation layer work in two different presentation models?

You mean the controller?

I can see this:

Model <shared>
Controller <shared>
View - one instance for web, one instance for web form

That makes more sense to me.

I'm also assuming your changes are to "something" not just random fields, but fields that belong to an object.

So why not maintain the original object state in the controller:

Controller<T> where T: class

T _state;

Have a typed args, something like:

public class TypedArgs<T> : EventArgs where T: class
{
public T Value { get; set; }
}

Create an interface for your views:

public interface IView<T> where T: class
{
event EventHandler<TypedArgs<T>> Changed;
}

then you can raise Changed with the new entity in the view, and have the controller register. Just pass in IView to the controller so it doesn't care if it's a user control or a web form, and when Changed is raised, it can compare e.Value to the stored state and decide what to do.

Jeremy Likness
Latest Article: Hierarchal Data Templates in Silverlight
Blog: C#er : IMage

GeneralRe: Design using MVP pattern [modified] Pin
Cybernate28-Jul-09 9:54
Cybernate28-Jul-09 9:54 
AnswerRe: Design using MVP pattern Pin
N a v a n e e t h28-Jul-09 15:55
N a v a n e e t h28-Jul-09 15:55 
GeneralRe: Design using MVP pattern Pin
Cybernate28-Jul-09 16:21
Cybernate28-Jul-09 16:21 
Questionuser availability Pin
gora1234528-Jul-09 4:43
gora1234528-Jul-09 4:43 
AnswerRe: user availability Pin
Vimalsoft(Pty) Ltd28-Jul-09 4:49
professionalVimalsoft(Pty) Ltd28-Jul-09 4:49 
GeneralRe: user availability Pin
gora1234528-Jul-09 5:32
gora1234528-Jul-09 5:32 
GeneralRe: user availability Pin
Vimalsoft(Pty) Ltd28-Jul-09 20:07
professionalVimalsoft(Pty) Ltd28-Jul-09 20:07 
Questionpls help Pin
jude mgbaka28-Jul-09 4:19
jude mgbaka28-Jul-09 4:19 
AnswerRe: pls help Pin
Abhijit Jana28-Jul-09 4:21
professionalAbhijit Jana28-Jul-09 4:21 
AnswerRe: pls help Pin
Vimalsoft(Pty) Ltd28-Jul-09 4:22
professionalVimalsoft(Pty) Ltd28-Jul-09 4:22 
AnswerRe: pls help Pin
Brij28-Jul-09 4:27
mentorBrij28-Jul-09 4:27 
AnswerRe: pls help Pin
Abhishek Sur28-Jul-09 5:40
professionalAbhishek Sur28-Jul-09 5:40 
AnswerRe: pls help Pin
Christian Graus28-Jul-09 10:42
protectorChristian Graus28-Jul-09 10:42 
QuestionPaging in datalist Pin
Ersan Ercek28-Jul-09 4:13
Ersan Ercek28-Jul-09 4:13 
AnswerRe: Paging in datalist Pin
Brij28-Jul-09 4:21
mentorBrij28-Jul-09 4:21 
AnswerRe: Paging in datalist Pin
Abhijit Jana28-Jul-09 4:45
professionalAbhijit Jana28-Jul-09 4:45 
QuestionCustomizing Gridview Pin
srikantha_nagaraj28-Jul-09 3:59
srikantha_nagaraj28-Jul-09 3:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.