Quantcast
Channel: SharePoint 2010 - Development and Programming forum
Viewing all articles
Browse latest Browse all 11571

JS \ Press Enter

$
0
0

I have an input textbox in a webpart and a label output. 

I use updatepanel to fill label when i input smthng into textbox without postback (while still having heavy server side query).

Now everything is fine, but i have to press ENTER in order to fill label with data.

So how do i:

1. Send ENTER thru javascript when i input smth into textbox

or

2. Invoke this AJAXPOSTBACK when i input smth into textbox. So that page wont refresh.

If i do

TextBox1.Attributes["onkeydown"] = "__doPostBack('TextBox1', '');";

then real postback happens and text is rolled back from previous state.


Viewing all articles
Browse latest Browse all 11571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>