The 'Font' property is 'ReadOnly' for a new font

What is wrong in my code Dim privateFonts As New System.Drawing.Text.PrivateFontCollection() privateFonts.AddFontFile("C:\Documents and Settings\somefont.ttf") Dim font As New System.Drawing.Font(privateFonts.Families(0), 12) LBL_Test.Font = fon

Error connecting to the DotNetNuke database Installation

I have been trying to install DNN 7 but it got stucked at the first step of installation. Giving the error "No valid default database connection detected. Standard Database setup option is unavailable Database Connection Error" ERROR:Index #: 0

__PostBack from a Growl message

i'm trying to update my gridview from a close method of a Growl Message. the jquery code is: $.gritter.add({ title: 'Success', text: msg.d[0], sticky: true, after_close: function () { __doPostBack('UpdatePanel1', ''); } }); the gridview updat

Can not write to a log file tried everything

Web.config <configuration> <configSections> <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net"/> </configSections> <log4net> <appender name="RollingFile"

Convert a webpage from HTML to PDF?

I have a website with the following structure: Tab Container - having 4 Tab panels Each tab panels is having 4 gridviews which are separated by line break. Now when i am in a particular tab, I want to use an 'export to pdf' button , which should gene

Using Entity Framework

I just started using Entity Framework and it created a Context class which I can use to get all the data i need from it. But I am facing an issue on how I should organize my code, by watching the demos, the person just uses the framework and codes ev

& ldquo; PHP style & rdquo; development with ASP.NET?

I'm learning ASP.NET (slowly), trying to avoid WebForms entirely, but I'm finding MVC, ORMs, EF, and all the rest a little bit overwhelming. I am quite solid with HTML, HTTP, CSS, C# and the BCL. I have a tiny bit of experience with PHP (ewww), but I

Insert date / time in the Access database

I'm using ASP.NET/VB and I'm trying to insert a date and time into an Access date/time field, but I'm getting an error (Data type mismatch in criteria expression). Here's a simplified version of my code: Dim myDate As Date = Now() Dim myIns1 As New O

Open PDF in Adobe Reader, not in the browser

when clicked from a link on an email, the following code causes a PDF document to open in the browser: Response.ContentType = mime; Response.WriteFile(path); HttpContext.Current.ApplicationInstance.CompleteRequest(); Is there any way to force the cli

I can not insert a value into my access database

This my code in VB.NET. My try catch says there is a syntax error in the instruction INSERT INTO. I don't know what happened to my INSERT. I searched for the error for over an hour... I'm not an expert in VB.NET, I'm better in C#, but I need to do th

Using anonymous types - how to avoid a lot of code

I have this situation: if (condition){ var variable = (from el in ....) //linq to sql query } else{ var variable = (from el in ....) //linq to sql query } // code where i can`t use the variable I want to avoid copying code in both conditions. var get

Set the max-height element in the html table

I realise that this question has probably been asked to death, but none of the answers I have found seem to work. I have an ASP repeater control, in which I have set the ItemTemplate to have a simple table with two rows. When populating the rows, I w

ASP.NET - Omit the question mark character

I was wondering if it is possible to omit the question mark in the URL after the aspx page and still be able to parse characters in the URL. For example, let's say I have this URL: http://localhost/?specialparam,story:extra. When I navigate to the pa

How to store TinyMCE after publishing in an UpdatePanel

When I click a button that causes a postback on the UpdatePanel it calls the tinyMCE.triggerSave(). It reloads the panel and the editor show up again, but when I try to call tinyMCE.triggerSave() the second time I get the following error:

Full site in Silverlight 4. Convenient or not?

Similar question: Using Silverlight for an entire website? That question is over 2 years old. Silverlight has gone a long way from Silverlight 1.0 Beta 1 to Silverlight 4.0 Final. Would it be practical to create a full Silverlight web application the

How can I get the greatest value from arraylist

I am using VS2008, and ASP.NET 3.5 C# I have an array list that is populated using a textBox & button for input of numbers. After clicking the button, I need to display the highest number in the arraylist. So far I know I need a loop to compare the t

What is the best practice for managing javascript and css files

How do You manage all of Your .js and .css files in project. Especially when they have a lot of dependency between each other? I've combined all script in one. But it's become weighty, and 90% of them were not used on particular pages. What I

Windows authentication prompts you for your username / password

I am trying to deploy an application in a client network, with AD/domain controller. My application is a simple c# application, using windows authentication. I am using win2003. Basically, using VS2008, create a new website, hosted on IIS6.0.

Why can not I debug my web application?

When I add a breakpoint and hit F5 to run in the debugger (I am using my debug build), a dialog pops up telling my my web.config file does not have debug=true in it (which is does) and I get 2 choices a) run without the debugger or b) let visual stud