GET textbox value
TextBox in a Contentplaceholder
Use : $("#<%=txtRepaymentAmt.ClientID%>")
TextBox Not in a Contentplaceholder
Use :
Use :
$(document.getElementById("ctl00_ContentPlaceHolder_TabContainerProduct_TabPanelSize_txtPrice"))
Get ddl value
var getValue = $("#<%=ddlTypeId.ClientID%>").val();
Get ddl Selected text
var getText = $("#<%=ddlTypeId.ClientID%> option:selected").text();
Split ddl selected value
var getText = $("#<%=ddlTypeId.ClientID%> option:selected").text().split('|');
var Text = getText [0].toString();
Set ddl selected value
var subType = "";
$("#<%=ddlTypeId.ClientID%>").val(subType );
Show
$("#<%=ddlTypeId.ClientID%>").show();
Hide
$("#<%=ddlTypeId.ClientID%>").hide();
TextBox in a Contentplaceholder
Use : $("#<%=txtRepaymentAmt.ClientID%>")
TextBox Not in a Contentplaceholder
Use :
$("#txt_Address")
TextBox in a gridview
USe :
$("table[id*=grd_RevisedPlan] input[type=text][id*=txt_amt]")
TextBox in a TabPanel
Use :
$(document.getElementById("ctl00_ContentPlaceHolder_TabContainerProduct_TabPanelSize_txtPrice"))
Get ddl value
var getValue = $("#<%=ddlTypeId.ClientID%>").val();
Get ddl Selected text
var getText = $("#<%=ddlTypeId.ClientID%> option:selected").text();
Split ddl selected value
var getText = $("#<%=ddlTypeId.ClientID%> option:selected").text().split('|');
var Text = getText [0].toString();
Set ddl selected value
var subType = "";
$("#<%=ddlTypeId.ClientID%>").val(subType );
Show
$("#<%=ddlTypeId.ClientID%>").show();
Hide
$("#<%=ddlTypeId.ClientID%>").hide();
very good job.....
ReplyDelete