say example have asp button:
<asp:button id="btncustomdropdown" text="*" onclick="txtoutputrating_btnpressed" runat="server"/> when user presses button, want keyboard button pressed. example down key on keyboard. thinking of on backend. possible?
void txtoutputrating_btnpressed(object sender, eventargs e) { system.windows.forms.sendkeys.send("{down}"); }
the short answer no - won't work.
the long answer is... depends entirely on software stack (e.g., web server running).
under iis code run have no effect. iis (i believe) runs service not allowed have ui interactivity.
if running using vs dev server code work on local machine only.
even if find production-ready web server allows ui interaction host page, code-behind runs on server. there no client-side web browser api injecting keypresses system.
Comments
Post a Comment