Click here to Skip to main content
15,903,203 members

Comments by Umesh Tayade (Top 6 by date)

Umesh Tayade 20-Nov-14 5:26am View    
Hi Greg, Ryan,
I have tried that as well but it wont works. I have tried different approaches to resolve it some of them are given below but none of them work. It works for all the browsers except safari. One thing i would like to mention is that when i switch the tab and again come back to same tab then it shows the value in the textbox. This means value is there but textbox needs to be refreshed.
1] $(textbox.id).val(ProductList[i]);
2] $(textbox.id).attr("value",ProductList[i]);
3] $(textbox)[0].textContent = ProductList[i];
4] $(textbox)[0].innerText = ProductList[i];
5] $(textbox)[0].value = ProductList[i];
6] textbox.value = ProductList[i];
7] document.getElementbyId(textbox.id).value = ProductList[i];


Thanks
Umesh Tayade
Umesh Tayade 19-Nov-14 9:52am View    
Hi Prasad,

Thanks for your reply.
If it is not getting the actual reference of textbox then that value wont be set at all. But when i check this control using web developer then i can see that value. Only thing is that it not displayed in the textbox.

Thanks
Umesh Tayade 1-Oct-13 5:41am View    
Hi Mehdi,

Thanks for response.

I tried above code but its not working.
I also tried by modifying my class as below:

public class places
{
[JsonProperty("addressType")]
public string AddressType { get; set; }
[JsonProperty("city")]
public string City { get; set; }
[JsonProperty("country")]
public string Country { get; set; }
[JsonProperty("featureType")]
public string FeatureType { get; set; }
[JsonProperty("position")]
public List<Position> Positions { get; set; }
[JsonProperty("state")]
public string State { get; set; }
[JsonProperty("street")]
public string Street { get; set; }
[JsonProperty("zip")]
public string Zip { get; set; }
}

public class Position
{
public string lat { get; set; }
public string lon { get; set; }
}

public class status
{
public int duration { get; set; }
public string procedure { get; set; }
public bool success { get; set; }
}

public class obJson
{
public places[] places { get; set; }
[JsonProperty("status")]
public status Status { get; set; }
}

obJson obj = JsonConvert.DeserializeObject<objson>(json);

but it is throwing error as "Cannot deserialize JSON object into type 'System.Collections.Generic.List`1[OpenstreetMap.Position]'."

Thanks

Umesh Tayade
Umesh Tayade 1-Oct-13 5:41am View    
Hi Kornfeld,

Thanks for response.

I tried above code but its not working.
I also tried by modifying my class as below:

public class places
{
[JsonProperty("addressType")]
public string AddressType { get; set; }
[JsonProperty("city")]
public string City { get; set; }
[JsonProperty("country")]
public string Country { get; set; }
[JsonProperty("featureType")]
public string FeatureType { get; set; }
[JsonProperty("position")]
public List<Position> Positions { get; set; }
[JsonProperty("state")]
public string State { get; set; }
[JsonProperty("street")]
public string Street { get; set; }
[JsonProperty("zip")]
public string Zip { get; set; }
}

public class Position
{
public string lat { get; set; }
public string lon { get; set; }
}

public class status
{
public int duration { get; set; }
public string procedure { get; set; }
public bool success { get; set; }
}

public class obJson
{
public places[] places { get; set; }
[JsonProperty("status")]
public status Status { get; set; }
}

obJson obj = JsonConvert.DeserializeObject<objson>(json);

but it is throwing error as "Cannot deserialize JSON object into type 'System.Collections.Generic.List`1[OpenstreetMap.Position]'."

Thanks

Umesh Tayade
Umesh Tayade 18-Sep-13 5:59am View    
Hi Harshil,

Thank you very much for quick reply.
I have use code provided by you by making some changes in it and it works Smile | :) .
Thanks you again. you have provided me the exact solution that i was wanted.

Thanks

Umesh Tayade