Why?
-
I made the following code, and I stand by it (kind of):
var numTweets = parseInt("<%= NumTweets.ToString() %>", 10);
Can you figure out why I would do such a thing? :)
Because your tweets were numb? :confused:
-
Because your tweets were numb? :confused:
:-D While most tweeters are numskulls, that is not the reason.
-
I made the following code, and I stand by it (kind of):
var numTweets = parseInt("<%= NumTweets.ToString() %>", 10);
Can you figure out why I would do such a thing? :)
Because you really don't wanna know and don't care about the number of twits?
Full-fledged Java/.NET lover, full-fledged PHP hater. Full-fledged Google/Microsoft lover, full-fledged Apple hater. Full-fledged Skype lover, full-fledged YM hater.
-
I made the following code, and I stand by it (kind of):
var numTweets = parseInt("<%= NumTweets.ToString() %>", 10);
Can you figure out why I would do such a thing? :)
What's the type of NumTweets? Perhaps it is not an int type and the conversion of it's type to var is different from the conversion of int to var. :)
Chris Meech I am Canadian. [heard in a local bar] In theory there is no difference between theory and practice. In practice there is. [Yogi Berra] posting about Crystal Reports here is like discussing gay marriage on a catholic church’s website.[Nishant Sivakumar]
-
I made the following code, and I stand by it (kind of):
var numTweets = parseInt("<%= NumTweets.ToString() %>", 10);
Can you figure out why I would do such a thing? :)
Because you have written this in a JavaScript function in ASP.NET, and NumTweets could be any base number, but you want it translating back to base 10. Or, you're a masochist.
*pre-emptive celebratory nipple tassle jiggle* - Sean Ewington
"Mind bleach! Send me mind bleach!" - Nagy Vilmos
CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier
-
I made the following code, and I stand by it (kind of):
var numTweets = parseInt("<%= NumTweets.ToString() %>", 10);
Can you figure out why I would do such a thing? :)
-
Because you really don't wanna know and don't care about the number of twits?
Full-fledged Java/.NET lover, full-fledged PHP hater. Full-fledged Google/Microsoft lover, full-fledged Apple hater. Full-fledged Skype lover, full-fledged YM hater.
While true, it's not the reason. :)
-
What's the type of NumTweets? Perhaps it is not an int type and the conversion of it's type to var is different from the conversion of int to var. :)
Chris Meech I am Canadian. [heard in a local bar] In theory there is no difference between theory and practice. In practice there is. [Yogi Berra] posting about Crystal Reports here is like discussing gay marriage on a catholic church’s website.[Nishant Sivakumar]
-
Because you have written this in a JavaScript function in ASP.NET, and NumTweets could be any base number, but you want it translating back to base 10. Or, you're a masochist.
*pre-emptive celebratory nipple tassle jiggle* - Sean Ewington
"Mind bleach! Send me mind bleach!" - Nagy Vilmos
CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier
All true (and that's sado-masochist to you!), but not the reason.
-
I made the following code, and I stand by it (kind of):
var numTweets = parseInt("<%= NumTweets.ToString() %>", 10);
Can you figure out why I would do such a thing? :)
just realized that this way you still get code formatting to your javascript, while if you'd used:
var numTweets = <%= NumTweets.ToString() %>;
the formatting from visual studio and the intellisense would've blown up
I'm brazilian and english (well, human languages in general) aren't my best skill, so, sorry by my english. (if you want we can speak in C# or VB.Net =p)
-
just realized that this way you still get code formatting to your javascript, while if you'd used:
var numTweets = <%= NumTweets.ToString() %>;
the formatting from visual studio and the intellisense would've blown up
I'm brazilian and english (well, human languages in general) aren't my best skill, so, sorry by my english. (if you want we can speak in C# or VB.Net =p)
That is exactly correct! :thumbsup: