Click here to Skip to main content
15,896,207 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
$(function () {
document.getElementById("<%=hidcounter.ClientID%>").value = 0;
var email = eval('<%=valueEmail%>');
var name = eval('<%=Values%>');
var NameArray = [name].split(',');//this is what i actually wants to do

What I have tried:

I want to split this string but when i'm trying to do so it does not allow me to do that.please help!
Posted
Updated 6-Jul-16 23:23pm

1 solution

try this
JavaScript
 var email = '<%=valueEmail%>';
var name = '<%=Values%>';
var NameArray = name.split(',');
 
Share this answer
 
Comments
Member 10549697 7-Jul-16 5:27am    
Sorry Sir But It doesn't work.it does not allow me to use 'split' but if i pass a string like ("Hello") it shows me the option of split
Karthik_Mahalingam 7-Jul-16 5:29am    
what is the value in "name" variable ?

what is valueEmail and Values ?
does this a public property in code behind??
Member 10549697 7-Jul-16 5:30am    
The value is coming from dynamic textbox
Karthik_Mahalingam 7-Jul-16 5:31am    
then you should use
var name = document.getElementById('YourDynamicTextBoxID').value;
Member 10549697 7-Jul-16 5:31am    
It is the value inside the dynamic textbox

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900