how to select contens of div?

  • Thread starter Thread starter Jeff
  • Start date Start date
J

Jeff

hi

asp.net 3.5

my webpage have a div. I want the contens of that div to be selected

this div don't have a runat="server", but I can put add runat="server" to it
so that it can be done via c#

Originally this div is hidden on the webpage. When the user clicks on
LinkButton on the page then this div becomes visible. I hoped that at the
same time as this div became visible the text inside the div also became
selected.

any suggestions how to go about doing that?
 
hi

asp.net 3.5

my webpage have a div. I want the contens of that div to be selected

this div don't have a runat="server", but I can put add runat="server" to it
so that it can be done via c#

Originally this div is hidden on the webpage. When the user clicks on
LinkButton on the page then this div becomes visible. I hoped that at the
same time as this div became visible the text inside the div also became
selected.

any suggestions how to go about doing that?

Hi Jeff,

from what I understood, it can be always selected. So, you can add a
javascript and call it onload. A javascript example can be found here
http://bytes.com/groups/javascript/475196-selecting-text-div

Hope this helps
 
Back
Top