Justin Cooney

Web Development Tips and Examples

  • There are quite a number of keyboard shortcuts available in Visual Studio, but of them all I only find some to be useful when developing. So without further ado here they are: (more…)

  • User defined functions are a useful tool when working with SQL Server. However recently as Luvy and I were working on creating a stored procedure we found out that user defined functions cannot be executed across a linked server in the usual way. We ran our tests on SQL Server 2008, but I believe this issue is applicable in SQL Server 2000 and 2005 as well.

    The specific problem we encountered was that we wanted to select data from a user defined function via the linked server into a temporary table while passing variable parameters to the function.

    After some trial and error we discovered two ways that one can execute user defined functions via a linked server. One can use the command: Openquery or one can use the command sp_executesql

    We first tried using the command Openquery, but encountered roadblocks when when passing in parameter variables.

    Then when we tried using the sp_executesql command, which ended up working like a charm.

    Below is an example of the sp_executesql command we ran cross server using two parameter variables called Field1 and Field2. (more…)

  • When developing or deploying a Web site you may be confronted with the rather vague error message: ‘CreateResourceBasedLiteralControl’ is not a member of ‘PageName.aspx’.

    I encountered this error today while deploying a site to our production  environment. The surprise was that I did not see this error when working on my local machine or our development server. I am still not sure why it did work on some machines but not others.

    After spending some time tracking down the cause, I found it to be related to conflicts in control Naming on a Web page. This can be due to: (more…)