Repost:hyperlink

  • Thread starter Thread starter ashoo
  • Start date Start date
A

ashoo

Guys!
I am trying to use a dropdownlist click event in my header
page to link to my main page in a frameset type of form.

I try to link to my main page with a hyperlink control.It
works fine. But I would like to use the click event of my
dropdownlist to do the samething. so I thought if could
trigger the clik event of the hyperlink within my
dropdownlist click event it could work. But I am not sure
how to set it up.

Note: redirect to the frameset form does not work.

Thanks for helping!
 
I presume you are talking about doing this on the client, since there is no
server-side click event for a hyperlink control. (It renders HTML that
handles this on the client.) Since you have frames, you should consider that
each frame holds a separate HTML page (by the time it gets to the client) so
it's a lot harder to navigate the frameset from the server than it would be
from the client. When it gets to the client, the object model is aware of
what it contains - on the server, it isn't.

So, what you want to do is to handle this using JavaScript on the client.
Rather than using a DropDownList control, use a <select> control (HtmlSelect
in the class library) and use an onchange client side event handler to
navigate to a new page in your other frame.
 
Back
Top