Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to use jquery method in asp.net
    primarykey
    data
    text
    <p>Q:</p> <p>I wanna to know how to use this jquery in asp.net.(steps)</p> <pre><code>$(...).scollTo( $('&lt;%= txt_evaluateWeights.ClientID %&gt;') ) </code></pre> <p>My original question is <a href="https://stackoverflow.com/q/6980781/418343">How to prevent the Focus() method from scrolling the page to the top</a></p> <p><strong>My aspx:</strong></p> <pre><code>&lt;asp:UpdatePanel ID="UpdatePanel1" runat="server"&gt; &lt;ContentTemplate&gt; &lt;asp:Panel ID="pnl_research" runat="server" CssClass="pnl"&gt; &lt;div id="detailsDiv" align="center" style="width: 800px;"&gt; &lt;table border="0" width="98%"&gt; &lt;tr&gt; &lt;td align="center"&gt; &lt;div class="grid" dir="rtl"&gt; &lt;div class="grid" dir="rtl"&gt; &lt;div class="rounded"&gt; &lt;div class="top-outer"&gt; &lt;div class="top-inner"&gt; &lt;div class="top"&gt; &lt;h2&gt; &lt;asp:Label ID="Label35" runat="server" Text="Evaluation"&gt;&lt;/asp:Label&gt;&lt;/h2&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="mid-outer"&gt; &lt;div class="mid-inner"&gt; &lt;div class="mid"&gt; &lt;asp:GridView Width="100%" ID="gv_Evaluation" CssClass="datatable" AllowSorting="True" runat="server" AutoGenerateColumns="False" AllowPaging="True" GridLines="None" OnRowDataBound="gv_Evaluation_RowDataBound"&gt; &lt;Columns&gt; &lt;asp:TemplateField HeaderText="s"&gt; &lt;ItemTemplate&gt; &lt;asp:Label ID="lblSerial" runat="server"&gt;&lt;/asp:Label&gt;&lt;/ItemTemplate&gt; &lt;/asp:TemplateField&gt; &lt;asp:BoundField HeaderText="activity type" DataField="activityType" /&gt; &lt;asp:BoundField HeaderText="weight" DataField="activityWeight" /&gt; &lt;asp:TemplateField HeaderText="eval"&gt; &lt;ItemTemplate&gt; &lt;telerik:RadTextBox ID="txt_evaluateWeights" runat="server" AutoPostBack="True" OnTextChanged="txt_evaluateWeights_TextChanged"&gt; &lt;/telerik:RadTextBox&gt; &lt;asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txt_evaluateWeights" Display="Dynamic" ErrorMessage="*" SetFocusOnError="True"&gt;&lt;/asp:RequiredFieldValidator&gt;&lt;/ItemTemplate&gt; &lt;/asp:TemplateField&gt; &lt;asp:BoundField HeaderText="mine" DataField="activitySelf" /&gt; &lt;asp:BoundField HeaderText="head" DataField="activityBoss" /&gt; &lt;asp:BoundField HeaderText="dean" DataField="activityDean" /&gt; &lt;/Columns&gt; &lt;RowStyle VerticalAlign="Top" CssClass="row" /&gt; &lt;/asp:GridView&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="bottom-outer"&gt; &lt;div class="bottom-inner"&gt; &lt;div class="bottom"&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/div&gt; &lt;/asp:Panel&gt; &lt;/ContentTemplate&gt; &lt;/asp:UpdatePanel&gt; </code></pre> <p><strong>My .cs:</strong></p> <pre><code>protected void txt_evaluateWeights_TextChanged(object sender, EventArgs e) { calc(); int index = ((System.Web.UI.WebControls.GridViewRow)(((RadTextBox)sender).Parent.NamingContainer)).DataItemIndex; ((RadTextBox)gv_Evaluation.Rows[index + 1].Cells[3].FindControl("txt_evaluateWeights")).Focus(); } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload