PostBack

  • Thread starter Thread starter ruca
  • Start date Start date
R

ruca

Can I force my page to do postback?

I have a page that only have links, but I wish that every time I click a
link that execute a function that I have in my code.
I know that with simple links, that postback does not exist.
I must have links and not link buttons, because I have to set the target for
the links and link buttons don't allow to do this.


How can I do this?
 
if they are an <a href...>
just add an id and runat=server.
They will then be accesible server side. Try manually adding an onclick
event. Either that or use a clientside onClick catch to do a form.submit()
 
They are an <a href=........>, and I alredy add an id and runat=server, but
I put it to de onClick but doesn't work. Here it is what I've do:

<a id='Tst' onClick='myFunction()' href='myForm.aspx' runat='server'
target='Main'>Test</a>

myFunction is present in my VB Code. This function access my DB.

Tell me if it is wrong.


--
Programming ASP.NET with VB.NET
Thank's (if you try to help me)
Hope this help you (if I try to help you)
ruca
 
How can I do that?


--
Programming ASP.NET with VB.NET
Thank's (if you try to help me)
Hope this help you (if I try to help you)
ruca?
 
Hi Ruca,

I was looking for an solution, than I thought this is strange.
I have a page that only have links, but I wish that every time I click a
link that execute a function that I have in my code.
I know that with simple links, that postback does not exist.
I must have links and not link buttons, because I have to set the target for
the links and link buttons don't allow to do this.

You want the window to open a new page using a link and on the same time to
do a postback to refresh the window.

What do I see wrong?

Cor
 
What do I see wrong?

It was that I don't want to open links in a new window and "refresh" the
current.
I must have "normal" links and no links buttons, because I have frames in my
page.

I have a frame with the menu, and the other is the target of the links
click. What happen is that in menu frame, each time I choose a link I must
verify something (don't matter what) in my vb code. That's why I must
"refresh" menu page.

Hope this hepls to understand my problem.
 
Back
Top