Click here to Skip to main content
15,445,560 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: ASPX How to get the form initiated from OperatePage - actually should be the existing instance Pin
QuickBooksDev26-Mar-15 2:30
MemberQuickBooksDev26-Mar-15 2:30 
AnswerRe: ASPX How to get the form initiated from OperatePage - actually should be the existing instance Pin
jkirkerx24-Mar-15 9:39
professionaljkirkerx24-Mar-15 9:39 
GeneralRe: ASPX How to get the form initiated from OperatePage - actually should be the existing instance Pin
QuickBooksDev25-Mar-15 10:53
MemberQuickBooksDev25-Mar-15 10:53 
GeneralRe: ASPX How to get the form initiated from OperatePage - actually should be the existing instance Pin
jkirkerx26-Mar-15 10:28
professionaljkirkerx26-Mar-15 10:28 
GeneralRe: ASPX How to get the form initiated from OperatePage - actually should be the existing instance Pin
QuickBooksDev26-Mar-15 10:38
MemberQuickBooksDev26-Mar-15 10:38 
GeneralRe: ASPX How to get the form initiated from OperatePage - actually should be the existing instance Pin
jkirkerx26-Mar-15 11:06
professionaljkirkerx26-Mar-15 11:06 
GeneralRe: ASPX How to get the form initiated from OperatePage - actually should be the existing instance Pin
QuickBooksDev27-Mar-15 3:54
MemberQuickBooksDev27-Mar-15 3:54 
QuestionWrong count is also accepting in Jquery and accepting keywords any where Pin
venu.rayapati24-Mar-15 2:02
professionalvenu.rayapati24-Mar-15 2:02 
Requirement: textbox limit: 25characters, max limit:40char allow
IF text contains {State},count for {State} only is 16,
{City} count 14, {St}=2,{Zip}=5

Problem:
I have written JQuery code for this (below code) but it accepts
1.25chars={City}123456789—correct
2.25charcters=1234567891245678{City}-wrong- but it also accepting this one
3.25-chareacters=123456789123456789{City}---wrong- but it also accepting this one




1 dropdown:MainContent_ddlSelectAdLine Options: HeadLine

1 Textbox: MainContent_txtAdline onkeyup=”
<input name="ctl00$MainContent$txtAdline" type="text" id="MainContent_txtAdline" onkeyup="getBatch(event);" style="border-style:Inset;width:85%;" maxlength="50">

1 Span: MainContent_lblCount—for charcters Counting
50

Jquery Code:

function getBatch(e) {
debugger;
var len=0;
var cnt = $("#MainContent_txtAdline").val();
var count = $("#MainContent_txtAdline").val().length;

if (cnt.indexOf("{City}") > -1)
{len = 16;$("#MainContent_lblCount").html(16);count = count-6+len}
else if (cnt.indexOf("{State}") > -1) { len = 14; count = count - 7 + len }
else if (cnt.indexOf("{St}") > -1) { len = 2; count = count - 4 + len }
else if(cnt.indexOf("{Zip}")>-1){len=5; count=count-5+len}
else { len = 0; count=count+len}


if (count <= 0) {
count = 0;
}

var ddlslectedText = $("#MainContent_ddlSelectAdLine option:selected").text();
if (ddlslectedText == "HeadLine") {
if (cnt.indexOf("{City}") > -1)
{ $("#MainContent_txtAdline").attr('maxlength', '30'); }
else if (cnt.indexOf("{State}") > -1)
{ $("#MainContent_txtAdline").attr('maxlength', '30'); }
else if (cnt.indexOf("{St}") > -1)
{ $("#MainContent_txtAdline").attr('maxlength', '30'); }
else if (cnt.indexOf("{Zip}") > -1)
{ $("#MainContent_txtAdline").attr('maxlength', '40'); }
else { $("#MainContent_txtAdline").attr('maxlength', '40'); }



if (count > 25) {
$("#MainContent_lblCount").html(count).css('color', '#CC0000');

}
else { $("#MainContent_lblCount").html(count).css('color', '#000000'); }
}

}
Questiongive me solution plzzzzzzzzzz Pin
Member 1149988323-Mar-15 19:08
MemberMember 1149988323-Mar-15 19:08 
SuggestionRe: give me solution plzzzzzzzzzz Pin
Richard MacCutchan23-Mar-15 22:30
mveRichard MacCutchan23-Mar-15 22:30 
AnswerRe: give me solution plzzzzzzzzzz Pin
F-ES Sitecore23-Mar-15 22:38
professionalF-ES Sitecore23-Mar-15 22:38 
AnswerRe: give me solution plzzzzzzzzzz Pin
ZurdoDev24-Mar-15 8:53
professionalZurdoDev24-Mar-15 8:53 
GeneralRe: give me solution plzzzzzzzzzz Pin
Member 467887925-Mar-15 4:49
MemberMember 467887925-Mar-15 4:49 
QuestionHow to Insert Update And Delete Record for html table in asp.net without gridview ? Pin
fateparakiran21-Mar-15 9:32
Memberfateparakiran21-Mar-15 9:32 
AnswerRe: How to Insert Update And Delete Record for html table in asp.net without gridview ? Pin
Ali Al Omairi(Abu AlHassan)22-Mar-15 22:52
professionalAli Al Omairi(Abu AlHassan)22-Mar-15 22:52 
QuestionMemberhip.CreateUser() is given an exception !! Pin
fahd95121-Mar-15 5:57
Memberfahd95121-Mar-15 5:57 
AnswerRe: Memberhip.CreateUser() is given an exception !! Pin
Matt U.24-Mar-15 9:47
MemberMatt U.24-Mar-15 9:47 
Questionget logged in user name Pin
Praveen Kandari20-Mar-15 0:53
MemberPraveen Kandari20-Mar-15 0:53 
AnswerRe: get logged in user name Pin
Afzaal Ahmad Zeeshan20-Mar-15 1:14
mveAfzaal Ahmad Zeeshan20-Mar-15 1:14 
QuestionInterview Question -Why Validation in Update Panel is not working properly? Pin
Rajesh waran19-Mar-15 19:37
professionalRajesh waran19-Mar-15 19:37 
AnswerRe: Interview Question -Why Validation in Update Panel is not working properly? Pin
F-ES Sitecore19-Mar-15 22:36
professionalF-ES Sitecore19-Mar-15 22:36 
AnswerRe: Interview Question -Why Validation in Update Panel is not working properly? Pin
Rajesh waran19-Mar-15 23:59
professionalRajesh waran19-Mar-15 23:59 
Questioncheck data exist or not? Pin
Praveen Kandari19-Mar-15 0:00
MemberPraveen Kandari19-Mar-15 0:00 
AnswerRe: check data exist or not? Pin
Afzaal Ahmad Zeeshan19-Mar-15 1:39
mveAfzaal Ahmad Zeeshan19-Mar-15 1:39 
AnswerRe: check data exist or not? Pin
F-ES Sitecore19-Mar-15 1:40
professionalF-ES Sitecore19-Mar-15 1:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.