Questions tagged [enterprise-web-library]

The Enterprise Web Library (EWL) is an extremely opinionated library for web applications that trades off performance, scalability, and development flexibility for an ease of maintenance you won't find anywhere else. It is built on ASP.NET and is available as a NuGet package.

33 questions
3
votes
2 answers

What is SelectList's defaultValueItemLabel used for?

When I'm creating a new SelectList, I (think only sometimes) see the defaultValueItemLabel option in SelectList.CreateDropDown(). The comment says The label of the default-value item, which will appear first, and only if none of the list items…
Sam Rueby
  • 5,914
  • 6
  • 36
  • 52
3
votes
2 answers

Enterprise Web Library web.config not currently compatible with Azure?

I am trying to use Enterprise Web Library with Windows Azure. It appears that the web.config file for the EWL project works fine locally, but when I deploy to Azure the application cannot initialize. After logging in and viewing the site locally on…
Sam Rueby
  • 5,914
  • 6
  • 36
  • 52
2
votes
1 answer

In EWL, how do I show custom validation content at an arbitrary place in the page?

I have a page that collects an email address, and upon submission of the form I see if that email exists. If it does, the user can't create the entity. Instead of showing a normal validation error status message, I would like to show a nice…
Greg Smalter
  • 6,571
  • 9
  • 42
  • 63
2
votes
1 answer

In EWL, can you alter a form item’s contents after a failed validation?

On an EWF page, is it possible to alter the content of a form item during validation (when a validation fails)? For an example: say you have a text box that you want to be spell checked before it gets entered into the database. You use the…
brendan
  • 310
  • 1
  • 2
  • 9
2
votes
1 answer

How can I have a custom login page in EWL?

I have a web application using Enterprise Web Library and I've found the need to have a custom log-in page. I see that EWL provides one for me, but I want to be able to have some custom elements on the page and control how the user is logged in. How…
1
vote
1 answer

How do I cache something within a request in EWL?

What's the best practice for caching data within a request? More specifically, let's say I a have a table with several rows of data and each row needs to do a separate database query to get details on a Bakery. I know that by the end of the request…
Greg Smalter
  • 6,571
  • 9
  • 42
  • 63
1
vote
1 answer

How do I store per-request state in EWL?

I want to store some state whose lifetime is the request. I believe I used to be able to store state manually in AppRequestState, but that class no longer provides that capability. As a fallback I am going to store the state in Session, but I'd…
Greg Smalter
  • 6,571
  • 9
  • 42
  • 63
1
vote
1 answer

In EWL, what's the best practice for parent-page/breadcrumbs on an entity accessible by multiple roles?

Let's say I have a screen that lets the user edit a person's general information, and this screen can be access by either the person themselves or by administrators. The administrators will be coming from a parent list of people, and ideally that…
1
vote
1 answer

Why do I get a concurrency error when hitting Enter without a submit button in EWL?

I have a page with some form items and an EwfLink (not a submit button). If I post back by hitting enter on any of the form fields, I get a concurrency error (even if I didn't change anything). If I don't do that, the page otherwise works. What's…
Greg Smalter
  • 6,571
  • 9
  • 42
  • 63
1
vote
1 answer

What is the correct way to create a data context for a console app in EWL?

Is this the right way to do a console application's data context? AppTools .Init("App's daily operations", false, new GlobalLogic(), () => new DataAccessState(cn => cn.Open())); If not, then how to do it?
Greg Smalter
  • 6,571
  • 9
  • 42
  • 63
1
vote
2 answers

Is EWL secure while having EnableViewStateMac set to false?

I watched a talk recently ( http://vimeo.com/68390507 ) where the speaker is very serious, saying several times, to never set EnableViewStateMac=false. While using Enterprise Web Library, I noticed that EnableViewStateMac is set to false. What is…
Sam Rueby
  • 5,914
  • 6
  • 36
  • 52
1
vote
1 answer

In EWL, how do I clear scroll position when navigating to the same page with different query parameters?

I am on MyPage.aspx?questionNumber=1 and I am navigating to MyPage.aspx?questionNumber=2. I am using this code create the navigation between the two: EwfUiStatics.SetContentFootActions( new ActionButtonSetup( "Next", …
Greg Smalter
  • 6,571
  • 9
  • 42
  • 63
1
vote
1 answer

In EWL, how do I configure email to use an SMTP server which requires username/password?

I know I can change the SMTP server in Standard.xml. But I don't see where I can specify a user name and password for that SMTP server.
Greg Smalter
  • 6,571
  • 9
  • 42
  • 63
1
vote
1 answer

How do I switch an Entity Setup from vertical to horizontal tabs?

I can never remember if I have to implement an interface on the page or the info, or if I have to override something. I want it here so I don't have to dig up an old solution. Also, is this information available anywhere in EWL comments or on the…
Greg Smalter
  • 6,571
  • 9
  • 42
  • 63
1
vote
1 answer

What is the correct datatype for an EWL-validated Phone Number field?

What should the data type of a phone number be in SQL Server? varchar? What length? And, where do I find this sort of information for EWL for similar fields (zip code, etc.)?
Greg Smalter
  • 6,571
  • 9
  • 42
  • 63
1
2 3