Joe Enos

Phoenix, AZ

jtenos.com

Age: 33

Software developer and architect, focused on .NET technologies. Aspiring entrepreneur, working on multiple startup projects.

Twitter: http://twitter.com/jtenos/

12h
awarded Peer Pressure
13h
comment Constant script -> change src iframe (1min, 5min) + jQuery
@Cheery Good point - I'd still stick with named functions just so it's easier to see what you're doing, but keeping them local inside the jQuery function would help keep the global namespace clean.
1d
comment Asp.Net Web Application, Single Source, Multiple instances - one per Company
@Cuppachee About each company getting their own features - even if you find a good way to set it up, you're just giving yourself a hard time in the future. Suddenly you can't just develop, test, and release a new feature once - if you have 10 clients with 10 slightly different codebases, you now have to develop, test, and release the change 10 times. Unless you have a very good reason (a lot more money would however be a good reason), I'd avoid customizing per client.
1d
comment Asp.Net Web Application, Single Source, Multiple instances - one per Company
@Cuppachee Regarding your connection string question - your web.config would just have one connection string, for your "Clients" database. That database could have a table with two columns: ClientID and ConnectionString (the entire thing). Your app would just need to pass in the ClientID to this database, and retrieve its ConnectionString, then use that connection string to query the real database for that client. Ideally you'd cache these in memory for awhile to avoid having to query your Clients database over and over.
2d
answered Constant script -> change src iframe (1min, 5min) + jQuery
2d
comment Asp.Net Web Application, Single Source, Multiple instances - one per Company
But if you stick with multiple databases, I'd probably have one "master" database with just all of your customers, and either connection strings for each of them, or some kind of identifier that can turn into a connection string. Then your web.config would have a single connection string, and you can add more companies without disrupting your app or config.
2d
comment Asp.Net Web Application, Single Source, Multiple instances - one per Company
First thing I'd recommend is reconsidering having multiple databases. If you keep your companyID or whatever on all of your tables and queries, then having one database will make life a lot easier, especially as you get more and more companies added.
2d
comment Arithmetic overflow error converting expression to data type int SQL Server
It makes a big difference - your query that you posted will overflow because of the cast to a decimal. If you're getting an overflow error while casting to an int, then what you've posted is not applicable.
2d
comment Using parameterized query is causing data type mismatch. Any ideas?
I haven't used Access in awhile, but I believe there are different number types (integer, float, etc.). Whichever one you're using, your parameter value has to be of that type.
2d
comment Arithmetic overflow error converting expression to data type int SQL Server
Are you sure that's your query and your output? You're missing the @ on your variables, and it should overflow converting to numeric, not int. At least that's what happens on SQL2008.
2d
comment Random Selection of two different objects causes objects to reference same value
Next on the randomizer expects an exclusive max, not an inclusive one. So instead of generator.Next(list.Count() - 1), it just should be generator.Next(list.Count()). For example, generator.Next(3) will give you 0, 1, or 2.
2d
answered Using parameterized query is causing data type mismatch. Any ideas?
Nov
25
comment Change structure of JS array
@pablochan Yep, I try to tell my boss to not support IE8 all the time. Doesn't work :)
Nov
25
comment Why @Using doesnt find PageList namespace
I don't have an answer, but that kind of stuff happens to me now and then - I usually use the "Microsoft solution" - clean the solution, close and reopen Visual Studio - if that doesn't work, delete the suo and csproj.user files, delete Temporary ASP.NET Files, reboot machine, etc...Eventually after messing with it long enough, I usually get the error to go away. Since it runs fine, it tells me it's a problem with Visual Studio, not the compiler or ASP.NET itself.
Nov
25
comment Change structure of JS array
@pablochan It looks like forEach is not available in IE8, so jQuery would be a reasonable alternative if you need to support that. Still the biggest reason to use jQuery for me is to handle old browsers - a reasonable percentage of users are still on IE8.
Nov
25
comment Change structure of JS array
Keep an eye on the browser compatibility for this one - IE8 is apparently not supported - you'd have to write your own map or use something like jQuery if you need to support it.
Nov
11
comment How to check whether javascript is enabled on browser on server side using c# in asp.net
FYI: Request.Browser.JavaScript just tells you whether or not the browser "supports" javascript, not whether it's enabled or not. So it will be true for every real browser, every time.
Nov
4
comment C# Read in a bmp image as binary
What exactly are you trying to do? Just get the bytes of the file? For that, File.ReadAllBytes is the fastest way to get them into a byte array. If you need the bytes as a stream, looks like you've already got that.
Nov
4
comment Replace characters in string array Javascript
Keep in mind that calling replace with a string as the first parameter, you'll only replace the first instance. In this scenario, that looks like it will be fine, but in the future, if you're looking to "replace all", the first would need to be a regex, like someString = someString.replace(/old/g, "new"); - since I usually want to do "replace all", I've just made it a habit to always use the regex syntax when calling replace.
Nov
4
comment ASP.NET Boilerplate How to Add JQuery
possible duplicate of Adding jQuery code to ASP.NET Boilerplate
1 2 3 4 5