asp.net-4.0

asp.net 4.0 web forms routing - default/wildcard route

不问归期 提交于 2019-12-17 11:01:48
问题 I there a simple way when using ASP.NET 4.0 routing with Web Forms to produce a route that will act as some kind of wildcard? It seems to me that within WebForms, you have to specify a route for every page - I am looking for some kind of generic route that can be used where nothing specific is required, perhaps mapping directly from path to path so... http://somedomain.com/folder1/folder2/page would possibly map to folder1/folder2/page.aspx Any suggestions? Thanks 回答1: You can match all

Entity Framework v2 doesn't support sql 2000?

我怕爱的太早我们不能终老 提交于 2019-12-17 10:02:33
问题 I installed the beta 2 of Visual Studio 2010 today. I went to test out the new entity framework stuff (to see if my "issues" from v1 were fixed.). I started adding a new connection string, but when i put in my information for sql 2000 it said "this server version is not supported. you must have Microsoft sql server 2005 or later.". Did they drop support for Sql Server 2000 in v2 of the entity framework??? 回答1: Submitted a support call to microsoft and they responded: Entity Framework v2 doesn

Font awesome inside asp button

删除回忆录丶 提交于 2019-12-17 09:30:06
问题 This is my asp:button code which is not rendering font awesome's icon but instead shows the HTML as it is: <asp:Button runat="server" ID="btnRun" Text="<i class='icon-camera-retro'></i> Search" ValidationGroup="edt" OnClick="btnRun_Click" CssClass="greenButton"/> Any idea how can I solve this issue? 回答1: You can't with the default asp.net button you will need to use a HTML button and give it runat=server attribute: <button runat="server" id="btnRun" class="btn btn-mini" title="Search"> <i

I need a fast runtime expression parser

随声附和 提交于 2019-12-17 04:22:58
问题 I need to locate a fast, lightweight expression parser. Ideally I want to pass it a list of name/value pairs (e.g. variables) and a string containing the expression to evaluate. All I need back from it is a true/false value. The types of expressions should be along the lines of: varA == "xyz" and varB==123 Basically, just a simple logic engine whose expression is provided at runtime. UPDATE At minimum it needs to support ==, !=, >, >=, <, <= Regarding speed, I expect roughly 5 expressions to

I need a fast runtime expression parser

天大地大妈咪最大 提交于 2019-12-17 04:22:15
问题 I need to locate a fast, lightweight expression parser. Ideally I want to pass it a list of name/value pairs (e.g. variables) and a string containing the expression to evaluate. All I need back from it is a true/false value. The types of expressions should be along the lines of: varA == "xyz" and varB==123 Basically, just a simple logic engine whose expression is provided at runtime. UPDATE At minimum it needs to support ==, !=, >, >=, <, <= Regarding speed, I expect roughly 5 expressions to

Can I develop for .NET Framework 4 in Visual Studio 2008?

六月ゝ 毕业季﹏ 提交于 2019-12-17 04:07:34
问题 My ASP.NET application runs in IIS on my web server and uses Microsoft .NET Framework 4 Beta 2. (Its Application Pool is set to .NET Framework version .NET Framework v4.0.21006.) It gives this new error: A potentially dangerous Request.Form value was detected from the client... This is due to a breaking change in .NET 4. To revert to the behavior of the ASP.NET 2.0 request validation feature, I added the following setting in the Web.config file: <httpRuntime requestValidationMode="2.0" /> Now

ValidateRequest=“false” doesn't work in Asp.Net 4

假如想象 提交于 2019-12-17 00:40:12
问题 I have a form at which I use ckeditor. This form worked fine at Asp.Net 2.0 and 3.5 but now it doesn't work in Asp.Net 4+. I have ValidateRequest="false" directive. Any suggestions? 回答1: Found solution at the error page. Just needed to add requestValidationMode="2.0" <system.web> <compilation debug="true" targetFramework="4.0" /> <httpRuntime requestValidationMode="2.0" /> </system.web> MSDN information: HttpRuntimeSection.RequestValidationMode Property 回答2: There is a way to turn the

Parameter is not valid calling Bitmap.Save()

百般思念 提交于 2019-12-13 17:19:48
问题 This in in an ASP.NET application. Locally, this code runs fine, but on our production server, it throws an exception of 'Parameter is not valid' when Bitmap.Save() is called. Should I not be using System.Drawing.Bitmap because its not recommened based on this: http://msdn.microsoft.com/en-us/library/system.drawing.aspx Classes within the System.Drawing namespace are not supported for use within a Windows or ASP.NET service. Attempting to use these classes from within one of these application

ASP.NET Web App using the wrong (2.0) CLR version (instead of 4.0)

◇◆丶佛笑我妖孽 提交于 2019-12-13 15:27:38
问题 I just deployed an asp.net web app I have been working on to a new dev machine. It's a 4.0 project converted from 3.5. For some reason, I get the following error when I try to hit the site via my IIS website under the Default Website: Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive. It lists this as being a config error on the ASP.NET error page: <compilation debug="true" targetFramework="4.0"/> However, I notice that at the bottom of the error page, the

How to set HtmlEditorExtender's content server-side

血红的双手。 提交于 2019-12-13 14:16:41
问题 I'm using the AjaxControlToolkit's HtmlEditorExtender in my ASP.NET 4.0 web app: <asp:TextBox ID="myTxt" runat="server" TextMode="MultiLine" Height="80px" Width="100%" /> <act:HtmlEditorExtender ID="heMyTxt" runat="server" TargetControlID="myTxt"> <Toolbar> etc... </Toolbar> </act:HtmlEditorExtender> When I set the content of the text box server-side like this: myTxt.Text = htmlStringFromDatabase; ...the content in the textbox is the literal HTML markup (i.e. <b>Bold</b> shows up just like