.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

dynamic text input with jquery

Posted By:      Posted Date: September 21, 2010    Points: 0   Category :ASP.Net

I have the following problem.I created a new jquery script (jquery.wim.dragtable.js).

This script allows for dragndrop columns and rows..

Now this script generates 2 hidden input boxes.


if ($("#" + dragObject + "_SortRow").length == 0)
                 $("body").append("<input id='" + dragObject + "_SortRow' type='hidden' />");


if ($("#" + dragObject + "_SortCol").length == 0)
                $("#form1").append("<input id='" + dragObject + "_SortCol' type='hidden' />");

Notice the last one is append to the form on the page.

My question is: How can i retrieve the content of the input (id="wim_drag_col_object_SortCol");
When i use request.Form i only get the "hard-coded" elements from my page. (Viewstate, EventValidation, and Button1).
But the dynamically added wim_drag_col_object_SortCol can't be found.


* jQuery wim drag 1.0.0
* Copyright 2010, WIM4YOU (http://www.wim4you.nl)
* Dual licensed under the MIT or GP

View Complete Post

More Related Resource Links

how to get the text of selected checkbox from asp.net checkboxlist control using jquery


I have asp.net checkboxlist control that bounded to a data source so the number of items in the control are different from one to to another time.

I have this function:

     $('#<%=chkListGroups.ClientID %> input:checkbox:checked').siblings('label').text();

this function will return all texts for all selected items in the control as a one string.

 I'm looking for a way that when I check a check box from the ckeckboxlist control will return only last checked checkbox.

this code :

$('#<%=chkListGroups.ClientID %> input:checkbox:checked').last().siblings('label').text(); 

returns last checked item for example if I checked second will return
second item then when I checked fifth item will return fifth item but
if now when I check third item will return fifth item so it is always
returning last item checked in the list and I'm looking to

Please advice me how to do this using jquery.

Jquery dynamic Category menu


Dear Friends

Im currently developing ecommerce web site. I reffered to some video tutorials in ASP.net website and i managed to develped basic store front for my ecommerce website. I would like give more attractive look to my categories menu using Jquery or ajax. Please someone help me to understand how to apply jquery or ajax to dynamic category menu.

I use web user control to create category menu. This is my code for that.

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="CategoriesList.ascx.cs" Inherits="UserControls_CategoriesList" %>
<asp:DataList ID="list" runat="server" CssClass="CategoriesList" Width="200px">
    Choose a Category
  <HeaderStyle CssClass="CategoriesListHead" />
    <asp:HyperLink ID="HyperLink1" Runat="server"
      NavigateUrl='<%# Link.ToCategory(Request.QueryString["DepartmentID"], Eval("CategoryID").ToString()) %>'
      Text='<%# HttpUtility.HtmlEncode(Eval("Name").ToString()) %>'
      ToolTip='<%# HttpUtility.HtmlEncode(Eval("Description").ToString()) %>'

dynamic button text vertical

I want to have vertical text in a button created at run time.If it is a label "writing-mode:tb-rl;filter: flipv fliph;" this code works but for button it is not.

disabling alpha input to a text box

how to disable alpha input to text box..?? thnks in advance 

JQuery with dynamic ASP.NET controls (DropDownList)

I am mixing JQuery with ASP.NET webforms.  Adding dynamic controls and accessing the selected values with JQuery works differently under different circumstances and I am trying to establish the difference. Why does Senario 1 work in debug mode but not without breakpoints?  What does databinding to a GridView do that adding DropDownList controls to a asp:panel does not? Is there some sort of DOM registration going on in DataBind? All senarios use the same JQuery: var ddlCollection = $("select[name$='ddlDynamicDropDown']") Senario 1: Breakpoints on each line (Success) Add DropDownList controls to a asp:panel dynamically in the PageLoad method (Does the page lifecycle matter? OnLoad method instead?). Run the code Select values and click on a button firing a JavaScript function (Break in Debug) Break in JavaScript file Access the dropdowns and their selected values successfully Senario 2:  Run the Senario 1 code without breakpoints (Fails to locate the ddlCollection) Senario 3: Use a GridView (Success) Add values to populate the DropDownList controls to a Generic List. Bind the values to a GridView control containing the DropDownList controls Run the code Select values and click on a button firing a JavaScript function Use JQuery to Access the dropdowns and their selected values successfully.  

how to select the Tree node value & text using javascriot or Jquery

how to select the Tree node value & text using javascriot or Jquery

how to search a text using jquery Ajex

how to search  a text using jquery Ajex

Dynamic Text Boxes Creation Problem

Hi all, I am creating 5 textboxes in a row. A new creates when user press enter in the last textbox. I have taken a hidden text field and in OnKeyDown of last textbox I am assigning the combination of last textbox Id with the table count  to the hidden field and in VB Code I am checking whether the tableCount + Last textbox Id is equal to the hidden field or not then only I am generating the new row. here is the code In JavaScript On KeyDown of remarks textfield. function funcNewRow(id,count,e) {    var e = event || evt;    var charCode = e.which || e.keyCode;    if(charCode == 13){      e = cancelKey(e);      htxtBox.value = id + count;    } }   In VB Page_load method calling getTableRow() method   if htxtBox.value = "remarks" & (Tbl.Rows.Count + ViewState("TotalClearedItems")) Then  Tbl.Rows.Add(GetTableRow(Tbl.Rows.Count + 1 + ViewState(Panel1.Controls.Add(Tbl))  Panel1.Controls.add(Tbl) htxtBox.Value = "" end if   Here I have to implement a clear functionality such as each row at last contains a check box when user click the check box and press clear button the checked rows have to deleted .   The clear button code as follows : cnt = CInt(Tbl.Rows.Count)  For i = cnt To 1 Step -1 c = Pag

Why input text is so small in the People Seach box?


I have SharePoint Server 2010 Enterprise based intra.
I have added People search box.

I wonder why text is so small if I add search word.


how to get list box all option in a text box using jquery


i crate a list box by database but i want all option in a Text box

<td><select name="ListBox1" multiple="multiple" size="8" id="ListBox1">
		<option value="">Select</option>
		<option value="1001">1001.Ashok</option>
		<option value="1002">1002.Rajiv</option>
		<option value="1003">1003.Garima</option>
		<option value="1012">1012.Akhil</option>
		<option value="1011">1011.Nasir</option>

how i do it

<td><select name="ListBox1" multiple="multiple" siz

jquery - span text changed event


is there a jquery event that is fired when the text of a span element is changed? The change event does not apply to <span> elements. I see reference to "text changed", but $('#PriceCond').bind('textchange', function(event, prevText) { ... }) ; does not work either.



     <input type="button" id="TestButton" value="Test" />

     <span id="PriceCond"></span>

<script type="text/javascript">
  $(document).ready(function ()

    var clickFunc =
          function ()
            var s1 = $('#PriceCond').text();
            $('#PriceCond').text(s1 + 'x');

    var priceChangeFunc =
          function ()
            alert('in priceChangeFunc');





using dynamic text with HTML.Actionlink


Hello there my second post of the day this is becoming a habbit LOL  :)

as part of my web app i have a series of buttons created using HtmlActionlink


<%=Html.ActionLink("Swap User", "Index","Home")%></td>   

However my buttons need to be translated into difrent languages depending on the    country the user is in 

Im translating the button lable text fine in my controller and passing it into the view , but now im alittle stumped over syntax

Id like to replace "Swap User" above with 

Rich text input on application pages


I have used the following in a custom Sharepoint 2010 application page:


how to jquery remove a specific text in table


a table create

<TD>This is a TD cell</TD>
<TD><PRE> </PRE></TD>
<TH>This is a TH cell</TH>
<TH VALIGN="TOP">Text aligned top</TH>
<TH>Image in TH cell with default alignments ---></TH>
<TH><IMG SRC="blylplne.gif" ALT="airplane"></TH>
<TH VALIGN="BOTTOM">Text aligned bottom</TH>
<TD><Image in TD cell with default alignments ---></TD>
<TD><IMG SRC="blylplne.gif" ALT="airplane"></TD>

but i require ttext

This is a TH cell
is deleted and display "Rituranjan"

jquery - assign a text to a textbox when checkbox is checked by client


hi guys.

I have a checkbox on my project and I have textboxes as well. I tried some jquery code as you can see below for this function;

I would like to get the ctl00$MainContent$firstnametxt.text value to ctl00$MainContent$firstnamedrivertxt.text value when the checkbox is clicked and I want the ctl00$MainContent$firstnamedrivertxt.text to be null if the checkbox is unchecked. how can I do that? the below one doesn't work for me.

<script type="text/javascript">
    //var myspan = $('#MyCheckBoxHere');

    $('#ctl00_MainContent_CheckBox1').click(function () {

        if ($(this).is(':checked')) {
        else {

Highlight text in a dynamic textbox


 Hi, I have a dynamic textbox appearing in a gridview on the row editing function. I have the following code to set the focus tot he textbox:

GridView1.EditIndex = e.NewEditIndex

This works fine, but I would now also like to select the data in the textbox so the user does not have to select the text before typing, they can just type straight away.

I have been trying to use:

txtTargetAmount1.SelectionStart = 0
txtTargetAmount1.SelectionLength = txtTargetAmount1.Text.Length

but this does not work.

Any ideas?


Based on the rowsize entered on the text box, how to generate a dynamic grid view of that many row?


Hi, I have a text box.It is having 2 validation on it(Range validator and req field validator). Now,if I enter an integer within 0-8,just after gettting out of focus of the text box,I need to generate a grid which should contain exactly that many number of rows. Now,My question is: 1.How to capture that number entered in the text box and without any button click event,how to to generate the grid?I suppose,I need to write the code in one of the TextBox event.But,which one and how? Please help me as I am in urgent need.

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend