Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   Postback Problem (http://www.velocityreviews.com/forums/t120728-postback-problem.html)

Alper OZGUR 03-02-2006 09:55 AM

Postback Problem
 
Hi;
In my code i'm checking some conditions and if the condition fails i want to
postback the page. Tried using the below methods but the when form is loaded
the postback status is false.. how can i solve?

Page_Load(1,SystemEventArgs.Empty)
or
Response.write("<script> __doPostback('Mybase','Load');</script>")





Eliyahu Goldin 03-02-2006 10:06 AM

Re: Postback Problem
 
"Postback" means posting the page back to the server from the client. How is
your scenario related to this definition?

Eliyahu

"Alper OZGUR" <alpozgur@gmail.com> wrote in message
news:e8Cez%23dPGHA.312@TK2MSFTNGP12.phx.gbl...
> Hi;
> In my code i'm checking some conditions and if the condition fails i want
> to postback the page. Tried using the below methods but the when form is
> loaded the postback status is false.. how can i solve?
>
> Page_Load(1,SystemEventArgs.Empty)
> or
> Response.write("<script> __doPostback('Mybase','Load');</script>")
>
>
>
>




Alper OZGUR 03-02-2006 10:19 AM

Re: Postback Problem
 
I'm counting some records.. if this value bigger than i gave. assigning some
value to a session object.. and need to postback the page..
cause there are lot's of codes writed in if postback=false then...


"Eliyahu Goldin" <removemeegoldin@monarchmed.com>, haber iletisinde şunları
yazdı:uUAZ6EePGHA.3936@TK2MSFTNGP10.phx.gbl...
> "Postback" means posting the page back to the server from the client. How
> is your scenario related to this definition?
>
> Eliyahu
>
> "Alper OZGUR" <alpozgur@gmail.com> wrote in message
> news:e8Cez%23dPGHA.312@TK2MSFTNGP12.phx.gbl...
>> Hi;
>> In my code i'm checking some conditions and if the condition fails i want
>> to postback the page. Tried using the below methods but the when form is
>> loaded the postback status is false.. how can i solve?
>>
>> Page_Load(1,SystemEventArgs.Empty)
>> or
>> Response.write("<script> __doPostback('Mybase','Load');</script>")
>>
>>
>>
>>

>
>




Eliyahu Goldin 03-02-2006 10:35 AM

Re: Postback Problem
 
What exactly do you mean under "need to postback"? To run the code located
in the "if postback=true" branch?

Eliyahu

"Alper OZGUR" <alpozgur@gmail.com> wrote in message
news:ujurXMePGHA.2624@TK2MSFTNGP12.phx.gbl...
> I'm counting some records.. if this value bigger than i gave. assigning
> some value to a session object.. and need to postback the page..
> cause there are lot's of codes writed in if postback=false then...
>
>
> "Eliyahu Goldin" <removemeegoldin@monarchmed.com>, haber iletisinde
> şunları yazdı:uUAZ6EePGHA.3936@TK2MSFTNGP10.phx.gbl...
>> "Postback" means posting the page back to the server from the client. How
>> is your scenario related to this definition?
>>
>> Eliyahu
>>
>> "Alper OZGUR" <alpozgur@gmail.com> wrote in message
>> news:e8Cez%23dPGHA.312@TK2MSFTNGP12.phx.gbl...
>>> Hi;
>>> In my code i'm checking some conditions and if the condition fails i
>>> want to postback the page. Tried using the below methods but the when
>>> form is loaded the postback status is false.. how can i solve?
>>>
>>> Page_Load(1,SystemEventArgs.Empty)
>>> or
>>> Response.write("<script> __doPostback('Mybase','Load');</script>")
>>>
>>>
>>>
>>>

>>
>>

>
>




Alper OZGUR 03-02-2006 10:40 AM

Re: Postback Problem
 
yes
"Eliyahu Goldin" <removemeegoldin@monarchmed.com>, haber iletisinde şunları
yazdı:ujMfwUePGHA.2176@TK2MSFTNGP10.phx.gbl...
> What exactly do you mean under "need to postback"? To run the code located
> in the "if postback=true" branch?
>
> Eliyahu
>
> "Alper OZGUR" <alpozgur@gmail.com> wrote in message
> news:ujurXMePGHA.2624@TK2MSFTNGP12.phx.gbl...
>> I'm counting some records.. if this value bigger than i gave. assigning
>> some value to a session object.. and need to postback the page..
>> cause there are lot's of codes writed in if postback=false then...
>>
>>
>> "Eliyahu Goldin" <removemeegoldin@monarchmed.com>, haber iletisinde
>> şunları yazdı:uUAZ6EePGHA.3936@TK2MSFTNGP10.phx.gbl...
>>> "Postback" means posting the page back to the server from the client.
>>> How is your scenario related to this definition?
>>>
>>> Eliyahu
>>>
>>> "Alper OZGUR" <alpozgur@gmail.com> wrote in message
>>> news:e8Cez%23dPGHA.312@TK2MSFTNGP12.phx.gbl...
>>>> Hi;
>>>> In my code i'm checking some conditions and if the condition fails i
>>>> want to postback the page. Tried using the below methods but the when
>>>> form is loaded the postback status is false.. how can i solve?
>>>>
>>>> Page_Load(1,SystemEventArgs.Empty)
>>>> or
>>>> Response.write("<script> __doPostback('Mybase','Load');</script>")
>>>>
>>>>
>>>>
>>>>
>>>
>>>

>>
>>

>
>




Mark Rae 03-02-2006 11:41 AM

Re: Postback Problem
 
"Alper OZGUR" <alpozgur@gmail.com> wrote in message
news:ug6FMYePGHA.720@TK2MSFTNGP14.phx.gbl...

> yes


>> What exactly do you mean under "need to postback"? To run the code
>> located in the "if postback=true" branch?


private void Page_Load(object sender, System.EventArgs e)
{
if(Page.IsPostBack)
{
PostBackCode();
}
else
{
if(SomeOtherSetOfConditions)
{
PostBackCode();
}
}
}

private void PostBackCode()
{
// postback code
}



Alper OZGUR 03-02-2006 11:59 AM

Re: Postback Problem
 
Thank you for response. But this is not my solution.. I have to raise the
postback to true...


"Mark Rae" <mark@markN-O-S-P-A-M.co.uk>, haber iletisinde şunları
yazdı:eblp%234ePGHA.1696@TK2MSFTNGP14.phx.gbl...
> "Alper OZGUR" <alpozgur@gmail.com> wrote in message
> news:ug6FMYePGHA.720@TK2MSFTNGP14.phx.gbl...
>
>> yes

>
>>> What exactly do you mean under "need to postback"? To run the code
>>> located in the "if postback=true" branch?

>
> private void Page_Load(object sender, System.EventArgs e)
> {
> if(Page.IsPostBack)
> {
> PostBackCode();
> }
> else
> {
> if(SomeOtherSetOfConditions)
> {
> PostBackCode();
> }
> }
> }
>
> private void PostBackCode()
> {
> // postback code
> }
>




Mark Rae 03-02-2006 12:11 PM

Re: Postback Problem
 
"Alper OZGUR" <alpozgur@gmail.com> wrote in message
news:O6$AJEfPGHA.428@tk2msftngp13.phx.gbl...

> Thank you for response. But this is not my solution..


Then you need to explain in much more detail what you're actually trying to
achieve...

>I have to raise the postback to true...


What does that actually mean...?



Alper OZGUR 03-02-2006 12:13 PM

Re: Postback Problem
 
at the code below i must raise the postback event..



If Session("TotalRecords") > 1500 Then

Say(rsxr.GetString("FALSESEARCH"))

Session("BigReport") = "True"

Session.Remove("SrchCrt")

FirstPage = True

Dim script As String = "@SCRIPT>__doPostBack('Btn_Pb','Click')@/SCRIPT>"

Page.RegisterClientScriptBlock("PostingBack", script.Replace("@", "<"))

End If



"Mark Rae" <mark@markN-O-S-P-A-M.co.uk>, haber iletisinde şunları
yazdı:O4xTjJfPGHA.2012@TK2MSFTNGP14.phx.gbl...
> "Alper OZGUR" <alpozgur@gmail.com> wrote in message
> news:O6$AJEfPGHA.428@tk2msftngp13.phx.gbl...
>
>> Thank you for response. But this is not my solution..

>
> Then you need to explain in much more detail what you're actually trying
> to achieve...
>
>>I have to raise the postback to true...

>
> What does that actually mean...?
>




Mark Rae 03-02-2006 11:14 PM

Re: Postback Problem
 
"Alper OZGUR" <alpozgur@gmail.com> wrote in message
news:e9a55LfPGHA.3144@TK2MSFTNGP11.phx.gbl...

> at the code below i must raise the postback event..


Why?

> Dim script As String = "@SCRIPT>__doPostBack('Btn_Pb','Click')@/SCRIPT>"


You're already in code-behind here - why don't you just call Btn_Pb's Click
code...?




All times are GMT. The time now is 08:03 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.