Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.
here is the working code:
{
txt = window.getSelection();
}
txt = document.getSelection();
txt = document.selection.createRange().text;
alert(
document.getElementById(
-----------------------------------------------------------------------
Response.Write(hidSelectedText.Value);