I am attempting to implement a custom locale service in an MVC 2 webpage. I have an interface IResourceDictionary that provides a couple of methods for accessing resources by culture. This is because I want to avoid the static classes of .Net resources.The problem is accessing the chosen IResourceDictionary from the views. I have contemplated using the ViewDataDictionary given, creating a base controller from which all my controllers inherits that adds my IResourceDictionary to the ViewData before each action executes.
(ViewData["Resources"] as IResourceDictionary).GetEntry(params);
Using VB.Net 3.5 framework, i have a site that is using a custom login form and custom error with custom error page in global.asax and web.config is set up for both the login form and custom error. All works fine: my users login and when they get an error, they get the custom error page. The pages also use querystrings when moving about the site in order to retrieve data from a data base using a customer name (this is not the login name) and order number. When an error occurs anywhere in the site, I'd like to pass the page name and its querystring parameters
(ex: page1.aspx?a=1&b=2) to the custom error as well as the user information so that all the user sees is the custom error page telling them the error and all details were sent to the admin. Currently, the custom error page has an email link so the user can send a message that includes the details which results in 2 emails being generated for an error: one from global.asax with the error info/stack trace and the one the user sends with the details.
In my mind, a graceful failure does not require input from the user, just an apology and assurance the problem has been fully reported and will be taken care of. So, can someone assist in getting the current user and page/querystring into the custom error code in global.asax?
I have a contact form that has the standard email fields such as name, email, street address, city, state, and body. This is being done with System.Net.Mail. I understand how to use the body, to/from address, and subject. I don't understand how to include the street address, city, and state with the email though.
I want this additional information to be sent with the email some how so the recipient can have access to it. I assume this should be included with the body when the email is sent. I don't understand the best way to so this though.
I thought about appending the values of these fields to the body of the email. I don't know how to format this so it looks good though. The formatting I want to do is very basic. I would like each of these values to be on a separate line before or after the body of the email. I'm not interested in colors or anything too fancy. I prefer to send a plain text email, if possible, if these values can be included on their own line.
Can anyone provide an example or a link to an article on this? Do I have to use an html formatted email and create new lines with in the body for these fields?
I'm working on an ASP.NET4.0/C# application for a public site that needs to authenticate only the employees that work at the associated business. The idea is for the site to have a CMS such that employees can go in and make changes to certain content without having to work with any html.My question relates to the design and use of a ASP.NET membership provider. I'm not trying to make the site work with an existing database, so there's no need to create my own MembershipProvider for that purpose.
I want to use the Control of ASP.NET (User wizard Control) to create user, but it only provide its default field like: -username, password, securityQuestion.All I want is the addtional information like Address, Company Name, Telephone number. And I know a solution by building it in 2 step, first the default username, passworld and the next step is the additional information. BUT i don't want to do like that.
I would like to know simple thing, If i'm adding additional information to UserProfile such as: Country, PhoneNumber etc'.. So, I added a Table In my DB (which also Got all Membership Provider tables...)
UserProfile, and added Stored Procedures for it for Insert / Update... I would like to know, If I need to create in Business Object a Class for Profile Only? (Cause the User is managed Already by the Membership Provider) And Create for it Also in Business Logic -> ProfileManager with Methods that will use the Stored Procedures to Update and Insert Details? Do I need to do it like this? Or there is another way? What's the right way doing it?
I'm using the ajax auto complete extender and everything works fine. What I need now is a solution how to send additional information (variable) into the method of the autocomplete extender in the webservice. I need this variable to specify the WHERE-clause of my Access-String.
I have a list of events that have been retrieved from a database a bit like this: Easter St Patrick's Day Christmas Independence Day ... I would like to make them links and when you click on the link it raises a modal popup and displays a bit more information from the database about the event. So far, I've set up the ModalPopupExtender like this on my page:
[Code]....
I thought the links might look something like this:
I'm not quite sure how well this will repeat though. It looks like I'll have to have a ModalPopupExtender for every single link which doesn't sound very efficient. Am I doing this right?
With Forms Authentication when the app needs to redirect to sign-in page is there an event or any extensibility point that will let me do additional work to the request before it redirects to the sign-in page?
I would like to send additional information in the query string that could vary such that it wouldn't work to just statically embed that in the link in the loginUrl node in the web.config.
Edit: For clarification, I want to intercept the request prior to being redirected TO the login page.
And prior the user being redirected to http://the/interwebs/login.aspx I would like to be able to pack in query values so the url could end up something like http://the/interwebs/login.aspx?Action=Refresh
i always get this error when ever i use DropdownExtender,Additional information:The Controls collection cannot be modified because the control contains code blocks i.e. <% ... %>).this is my ASPX Code
My web application will be launched through existing thick client applications. When launched, an HTTP POST request will be generated including information like the userID and additional context information (basically stuff like the target user's name, birthday, etc.).
My plan for authentication is for there to be a look-up table in the database. If the username is already there, automatically login the user, but if there is no entry in the database, redirect the user to an initial login page which will be used to create that database entry.
My question is how to secure this against MITM and other security holes. How can the request generated through the thick client be on an SSL connection? Doesn't an SSL connection have to be authenticated with the username (and password) first? And if so, will the additional context information be publicly exposed until the user is logged in?
I am getting started with Ap.net MVC. For that i chose to practice it by build an application. Im using MVC 2 and Linq To SQL, and i would like to passing another Query to the view. For example, i have this:
[Code]....
So i would like to pass data1 and data2 to the View. I can use return View(data1), but the View function accept just one data. So what technique i can use to pass the tow data to the view
and i make tthe page for login , if the student is record login successfully, how can make page to display information for this student who is logged on the rest of the data without viewing the other students who are in the database. Note:I used the session in the login page .
Each row has a drop down, a text box and an "add" link. I'd like for someone to select something in the drop down, edit something in the text box and pass that information to an Action in the Controller.
I know i can do something like this:
[Code]....
[Code]....
Which is kind of gross - id like to do just call one action, that passes the selected drop down value, the textbox value and call just the one action, is it possible to do something like this:
[Code]....
Where i pass the Dropdownlist selection and the textbox value to my controller specifically
king for some advice on storing views in a data-store (database, file, other) and display them based on routing data, all using ASP.NET MVC 2 and ASP.NET Routing.For example, I'd like to be able to display different views based on the following route dataBut in the same vein I'd like to display:All are based on strings, and the data isn't fixed. So based on the number of segments maybe, use that as the selection criteria into the data-store...additionally, I may not know the segments up front, so they'd all be dynamic.
Is this Possible? I cannot send it trought model becouse I am sending a list of Products which have a Type field. I don't know how to show in the List view Instead of Type id a Type name instead
I'm playing around with storing application settings in my database, but I think I may have created a situation where superfluous roundtrips are being made. Is there an easy way to view roundtrips made to an MS Access (I know, I know) backend?
I guess while I'm here, I should ask for advice on the best way to handle this project. I'm building an app that generates links based on file names (files are numbered ints, 0-5000). The files are stored on network shares, arranged by name, and the paths change frequently as files are bulk transfered to create space, etc.
Example:
Files 1000 - 2000 go to /path/1000s Files 2001 - 3000 go to /path/2000s Files 3001 - 4000 go to /path/3000s
etc
I'm sure by now you can see where I'm going with this. Ultimately, I'm trying to avoid making a roundtrip to get the paths for every single file as they are displayed in a gridview.
I'm open to the notion that I've gone about this all wrong and that my idea might be rubbish. I've toyed around with the notion of just creating a flat file, but if I do that, do I still run into the problem of having that file opened and closed for every file displayed in a gridview?
How do you set a string to denote the required format pattern in a text box. For instance, if I have a text box displayed such as a date field, how do I display a format of "dd/mm/yyyy" to help the User complete the field. If the field is already populated when the view is displayed then the actual data should be displayed.
If the field is a drop down list, I would like to display "Please select from the list" if the field does not contain a value.
I am currently useing forms authenticantion with users set up with the Membership API and I have there other information like first name and work phone number stored useing the Profiles API. I want to create a company directory useing a grid view to display every user and there profile information. I can use Membership.GetAllUsers() or ProfileManager.GetAllProfiles() but it does not list any of the custom profile information like name and phone. What is the best way to get a grid view to show all the user information?
Well it's finally time to stop ignoring my unit's need for reports. I keep coming to dead ends. I gave up the crystal reports idea, and ssrs seems a little easier. Now the problem is that I'm creating a report locally on my laptop, then will change the connection string, upload it to my server and have it run against an identical database on the server.
I'm using SQL Server Express locally, and when I try to create a dataset (using the wizard), I can see the tables, but when I try to add one, I get an error message "Could not retrieve schema information for table or view". I looked up this error and there isn't much useful info on it. I guess it some bug when trying to use SS Express? Is there a work around for this? Can I create the report programmatically? Should I use a different kind of reporting service?