Had to do this today, took a few minutes of google searching
In order to dynamically populate a drop down list use the following logic:
SqlConnection connection = new SqlConnection(connectionString);
string query = “SELECT STUFF1, [STUFF2] FROM STUFFTABLE”;
SqlCommand command = new SqlCommand(query, connection);
SqlDataReader reader = command.ExecuteReader();
lstAppointmentType.DataSource = reader;
lstAppointmentType.DataTextField = “STUFF1”;
lstAppointmentType.DataValueField = “STUFF2”;
Easy stuff once you see it done. Note the column with  around it is shown so you know to not include the s when you add to the list.
I received this error after deployment of a new Sql CLR function:
An error occurred in the Microsoft .NET Framework while trying to load assembly id 65545. The server may be running out of resources, or the assembly may not be trusted with PERMISSION_SET = EXTERNAL_ACCESS or UNSAFE. Run the query again, or check documentation to see how to solve the assembly trust issues. For more information about this error:
System.IO.FileLoadException: Could not load file or assembly ‘sqlclr, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null’ or one of its dependencies. An error relating to security occurred. (Exception from HRESULT: 0x8013150A)
at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
at System.Reflection.Assembly.Load(String assemblyString)
I found the following solution that seems to work:
Turn on the Trustworthy flag on the database you are deploying to using:
ALTER DATABASE YOURDATABASENAME
SET TRUSTWORTHY ON
After that the clr assembly should have no problem running.
Execution of user code in the .NET Framework is disabled. Enable “clr enabled” configuration option
EXEC sp_configure ‘show advanced options’ , ‘1’;
EXEC sp_configure ‘clr enabled’ , ‘1’ ;
Add the below section to your CSS file and set your BackgroundCssClass = “modalBackground”
You will get a very nice looking black transparency around the modal popup panel similar to applications such as picasa.
In one of my web application projects I wanted to create some modal popups that would collect user input and validate. I ran into an error using required field validators and regular expression validators.
The modal popup would show as normal and if the validators would trigger on bad input. Once a validator was triggered, if the user cancelled the modal popup they would no longer be able to activate any controls on the page.
Always put your validation controls in a validation group, this will prevent a few headaches you may run into. If you have multiple modal popup forms, put each forms validation controls in their own validation groups.