How can I cause a postback in code?

  • Thread starter Thread starter dee
  • Start date Start date
D

dee

Hi
How can I cause a postback in code, e.g., without clicking on a button?
Thanks.
Dee
 
Surely it is possible but my advice u to use a link button set
style="display:none" and use javascript (click method) to raise click
event....
 
Well, it's not quite that simple. You use this method to get a block of javascript
and then you have to attach it somewhere in the rendered HTML (typically
in some client side javascript event). Once the client side event fires,
then it will execute this javascript which triggers the postback.

-Brock
DevelopMentor
http://staff.develop.com/ballen
 
Microsoft .NET Framework works at server side.
Javascript works on client side.

You should use javascript to submit form. For instance,
<a id="s">a</a>

at javascript code,

s.click()


--

Thanks,
Yunus Emre ALPÖZEN
BSc, MCAD.NET
 
I love the way .net has made things so easy


Brock Allen said:
Well, it's not quite that simple. You use this method to get a block of
javascript and then you have to attach it somewhere in the rendered HTML
(typically in some client side javascript event). Once the client side
event fires, then it will execute this javascript which triggers the
postback.

-Brock
DevelopMentor
http://staff.develop.com/ballen
 
Thanks
Its complicated. I consider using another approach if possible.
Good luck.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top