HtmlAnchor postback

G

Guest

Hi,

I am trying to implement a postback from a control with a textbox and anchor
to perform a search. I cannot use link button due to javascript being turned
off. Is there a way of implementing postback from an anchor tag?

Jim
 
G

Guest

attach the javacript to the href tag
href="javascript:fndosome();"
or in server side also
ctl.attributes.Add("href","javascript:fndosome();")
 
B

bruce barker \(sqlwork.com\)

if javascript is disabled, the only html control that will postback is a
submit or image button. (asp:button). anchors will on perform a get, and not
postback data.

-- bruce (sqlwork.com)
 
G

Guest

do a formname.submit
...
also does it mean no client side script works like vbscript, jscript etc
just a thought
 
Joined
Mar 11, 2008
Messages
1
Reaction score
0
Anchor Tag Postback

You can add runat="server" in the anchor tag to post back.
Eg:

<a href="home.html" runat="server">Click Me</a>

This makes the anchor tag to post back
 

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

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top