From: Jeff on
Hi

asp.net 4.0
vs2010

I'm developing an asp.net model -view-presenter, and to my surprise i see
that when I click on the linkbutton in the window the Page_Load event is
fired again. Is that normal? I'm used to webforms where we could just do a
if (!Page.IsPostBack) if statement in the Page_Load. I did that but then no
action happend when I clicked the linkbuttons in the window.

any suggestions?


From: Mr. Arnold on
Jeff wrote:
> Hi
>
> asp.net 4.0
> vs2010
>
> I'm developing an asp.net model -view-presenter, and to my surprise i see
> that when I click on the linkbutton in the window the Page_Load event is
> fired again. Is that normal? I'm used to webforms where we could just do a
> if (!Page.IsPostBack) if statement in the Page_Load. I did that but then no
> action happend when I clicked the linkbuttons in the window.
>
> any suggestions?
>
>

I see you're using MVP based on this post. And how you would get a
string value from a Querystring to the MVP is you would have a string
property on the View Interface.

On a page event such as Page_Load, you would set the string property on
the View Interface with the Querystring value.

Then when the application access a method in the MVP, then you can get
the value for the string property on the View Interface.
From: Jeff on
with string property on the view interface I assume you mean something like:
public QueryString{ get; set;} right?




"Mr. Arnold" <Arnold(a)Arnold.com> wrote in message
news:uP3YzDHHLHA.5472(a)TK2MSFTNGP04.phx.gbl...
> Jeff wrote:
>> Hi
>>
>> asp.net 4.0
>> vs2010
>>
>> I'm developing an asp.net model -view-presenter, and to my surprise i see
>> that when I click on the linkbutton in the window the Page_Load event is
>> fired again. Is that normal? I'm used to webforms where we could just do
>> a if (!Page.IsPostBack) if statement in the Page_Load. I did that but
>> then no action happend when I clicked the linkbuttons in the window.
>>
>> any suggestions?
>
> I see you're using MVP based on this post. And how you would get a string
> value from a Querystring to the MVP is you would have a string property on
> the View Interface.
>
> On a page event such as Page_Load, you would set the string property on
> the View Interface with the Querystring value.
>
> Then when the application access a method in the MVP, then you can get the
> value for the string property on the View Interface.


From: Mr. Arnold on
Jeff wrote:
> with string property on the view interface I assume you mean something like:
> public QueryString{ get; set;} right?

yes


>
>
>
>
> "Mr. Arnold" <Arnold(a)Arnold.com> wrote in message
> news:uP3YzDHHLHA.5472(a)TK2MSFTNGP04.phx.gbl...
>> Jeff wrote:
>>> Hi
>>>
>>> asp.net 4.0
>>> vs2010
>>>
>>> I'm developing an asp.net model -view-presenter, and to my surprise i see
>>> that when I click on the linkbutton in the window the Page_Load event is
>>> fired again. Is that normal? I'm used to webforms where we could just do
>>> a if (!Page.IsPostBack) if statement in the Page_Load. I did that but
>>> then no action happend when I clicked the linkbuttons in the window.
>>>
>>> any suggestions?
>> I see you're using MVP based on this post. And how you would get a string
>> value from a Querystring to the MVP is you would have a string property on
>> the View Interface.
>>
>> On a page event such as Page_Load, you would set the string property on
>> the View Interface with the Querystring value.
>>
>> Then when the application access a method in the MVP, then you can get the
>> value for the string property on the View Interface.
>
>
From: "Mr. Arnold" MR. on

"Jeff" <it_consultant1(a)hotmail.com.NOSPAM> wrote in message
news:%23T8ZkwGHLHA.3352(a)TK2MSFTNGP05.phx.gbl...
> Hi
>
> asp.net 4.0
> vs2010
>
> I'm developing an asp.net model -view-presenter, and to my surprise i see
> that when I click on the linkbutton in the window the Page_Load event is
> fired again. Is that normal? I'm used to webforms where we could just do a
> if (!Page.IsPostBack) if statement in the Page_Load. I did that but then
> no action happend when I clicked the linkbuttons in the window.
>

http://www.eggheadcafe.com/software/aspnet/32180550/linkbutton--postback.aspx