webforms

C# Webforms show Loading indicator during code execution [closed]

China☆狼群 提交于 2019-12-31 02:46:28
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 5 years ago . The Webforms application I have is very data heavy, it's mostly ASP controls doing ADO.net operations. I have loading times of anywhere from 5-15 seconds, which is normal, but I'd like to make it more obvious to the user that their request is being processed. What I'd like to do

ASP.NET Web Form parameters in URL

試著忘記壹切 提交于 2019-12-31 02:46:10
问题 I have an ASP.NET page that contain a form that search the page. Is there any solution so that I can have the search text in the URL? I want to give the posibility to my clients to copy/paste the search results URL. 回答1: There might be other better/cleaner/proper ways of doing it, like changing form's action, or changing button's PostBackUrl, but this is what I would do. Redirect to self with search term appended to query string. On page load, if query string is not empty, do search. .aspx:

ASP.NET Webforms CRUD scaffolding with Entity Framework 5

雨燕双飞 提交于 2019-12-30 13:14:46
问题 Back in Feb MS introduced: http://www.nuget.org/packages/Microsoft.AspNet.Scaffolding.WebForms/ http://blogs.msdn.com/b/webdev/archive/2013/02/20/pre-release-of-asp-net-scaffolding-with-a-web-forms-scaffold-generator.aspx but it appears that it will be dropped from VS2013 ASP.NET Web Forms Scaffolding feature missing in VS 2013 RC I followed the instructions here http://dotnetguts.blogspot.com.au/2013/06/scaffolding-for-aspnet-webforms.html to install the package under Visual Studio 2012 but

How to save state across requests for an entity in ASP.NET without saving to database using EntityFramework?

心不动则不痛 提交于 2019-12-30 10:44:59
问题 I'm working on a CRUD ASP.NET WebForms web application consisting of a couple of pages in which the user fills in data. My client doesn't want to store the entities in the database between pages until the user clicks Finish on the last page (for various reasons). What options are there to propagate the filled in data between the pages and which is the least bad? From my readings I've seen that ViewState and Server.Transfer can be used. Any other options, preferably using less magic strings

WebForms page inside of Orchard CMS Application

こ雲淡風輕ζ 提交于 2019-12-30 08:49:07
问题 I'm trying to include a webforms (.aspx) page inside of an Orchard 1.2 application. I've tried adding back the aspx handler in the web.config <add path="*.aspx" verb="*" type="System.Web.UI.PageHandlerFactory" /> and added code to the Global.asax to try and get routing to ignore aspx requests routes.IgnoreRoute("{resource}.aspx/{*pathInfo}"); I'm still receiving a 404 response anytime I request the aspx page. How do I make this work? 回答1: Here's a web.config that has worked for me: <?xml

typescript for web forms

我只是一个虾纸丫 提交于 2019-12-30 06:21:08
问题 Is typescript supported on web forms? I have an existing asp.net 4.5 web forms project where typescript does not seem to be working. I cannot create a new file, but even if I rename an existing to .ts it does not seem to be working. No build, no intellisense, nothing! 回答1: Found the answers to my problems: I was trying to find "Typescript file" in Web folder of the "Add New Item" dialog, although it is in the "Visual C#" folder ..... Why? Unless you have a .ts file created with "Add New Item"

How to add custom table in ASP.NET IDENTITY?

痴心易碎 提交于 2019-12-30 06:02:33
问题 I'm using ASP.NET Identity on my web form application. Below is my current identity tables: Current Identity tables - Role - User - UserClaim - UserLogin - UserRole I need to add a new table to store additional information. New Table: UserLogs Fields inside the new table: UserLogID (PK) UserID (FK) IPAddress LoginDate How can I add this custom table? I know how to add custom fields inside existing table but I don't know how to achieve this. I appreciate your efforts in reaching a solution for

What's the best way to highlight a required field on a web form?

那年仲夏 提交于 2019-12-30 04:07:43
问题 I don't find the oft-used "*" to be very nice looking - can anyone suggest a nicer-looking method or point me to an example? I tried making the field highlighted in red as one person suggested but I did not like the look. Bold labels might do the trick. But I really like the idea of "Required" being shown in grey in the field until text is added. Does anyone have code for this? 回答1: Generally speaking, the best web forms are the simplest ones that require me to think the least. The "standard"

Use Javascript to change which submit is activated on enter key press

笑着哭i 提交于 2019-12-30 03:43:05
问题 I have a form on an HTML page with multiple submit buttons that perform different actions. However, when the user is typing a value into a text input and hit enters, the browsers generally act as though the next submit button sequentially was activated. I want a particular action to occur, so one solution I found was to put in invisible submit buttons into the HTML directly after the text inputs in question, like this: <input type="text" name="something" value="blah"/> <input type=submit name

Unity and ASP.NET WebForms - No parameterless constructor defined for this object

萝らか妹 提交于 2019-12-30 03:26:12
问题 Does anyone have any good examples of how to make Unity 1.2 or 2.0 work with ASP.NET WebForms? I thought I had this figured out, but evidently I'm missing something. Now I'm getting the error; "No parameterless constructor defined for this object". I remember getting this error a couple years ago, I and just don't remember what I did. Obviously Unity isn't working as it should because somewhere along the way I've forgotten something. Any help would be appreciated. Here's some of my code: