I am trying to write a simple library for MVC2 projects that takes care of user login, e-mail validation, password recovery, logging, etc. Since some of these steps involve user interaction, I need to have Views and Controllers in that project.In MVC2 Preview 2, one could do this by abusing areas (at least, it seems) since they were implemented as different projects. However, in the RC, creating a new area will merely create a subfolder. Since I want to share the base code between applications, that is not an option.I tried to brutally hack the AfterBuild steps into my project files, but that feels like the craziest hack ever.
I want to create a reusable user control which contains a date time picker in asp.net. Need to add this user control in a grid view as column.While clicking the column,date time picker has to be displayed.Which is the suitable method,Creating the component or creating the user control. Also want to know, How to add this component in to the toolbox?
User instantiates an action which calls a controller. The controller tries to render a view that contains content + multiple widgets (left rail, right rail, etc). The Widgets all have their own individual partial views but each partial view should inherit or consume a base set of widget markup and have controller areas where to embed functionality.
Functionality in the head, body, and footer can either be plain text, HTML, or additional custom controls.
How can I get all the textboxes inside a create user wizard control using getElementsByTagName().
Below is my JQuery code:
The above code isn't displaying hint text when the textbox retreives focus.
I think there is something wrong with this getElementsByTagName("asp:TextBox"); , I have also tried getElementsByTagName("TextBox"); , getElementsByTagName(":textbox"); and getElementsByTagName("input"); .
But no one of them gets the textboxes array.
Can anyone tell what will be the correct syntax for getting all the textboxes inside a create user wizard control using getElementsByTagName()?
I made myself a Partial View that list a set of items.
Each item have a checbox and the control have 2 dropdowns (Actions like delete, archive, etc and Filters)
It works fine, but a single view can hold several of these controls, and loading all the data over is a bit overkill.
I figured I need to create some Ajax control that does the same job, and just update the control the user select an action or filter for.
I want to create a new web server control that adds AJAX functionality to the existing asp.net 3.5 gridview control. But I am not sure which project to use - asp.net server control, or asp.net ajax server control.
Could someone give me a small example how i can make reusable WebUserControl (.ascx) file.Basically i need to make a employee lookup utility where users enters employee id to get Emplyee information.Once the Emplyee information is available, it is used in various data entry tasks by the page that includes the control.
I'm trying to create reusable "zones" but am having trouble figuring out how to give them all unique ids.What I'd like is to be able to create a component which can be put on an mvc page using the usercontrol syntax or using RenderAction or RenderPartial. I want to be able to update these components' content using ajax, so I need someway to reference them by id. However, there is no mechanism in MVC that wraps anything in a div or something like that.
I've learned that if I extend ViewUserControl and put the controls on the page like so:
I am searching already the web for some hours to get this working. I created a custom control (ConfigTree), which has a treeview as part of it. I put the custom control into an update panel. So far so good. When I click on different buttons (in ucc:ConfigTree) or the treeview in the custom control an async postback is done. When clicking on a node in the treeview an event for the parent element (ConfigTree) is generated, which populates again an event (NodeSelected) for the parent element (shown below). Different parent elements can handle the event differently. In one element (this one) I need to transform the async postback in a real postback with full page refresh. For better understanding see the following code:
the parent element (here shown) should process the OnNodeSelected and transform it into an full postback and not just an async postback, but only this event, all the other events in the ucc:ConfigTree should processed async. How can I do that? Is there a method to call in the code behind?
I want have a web application that I am putting together - but I have started to see that some of the things I am writing are repeated over and over, example -
GetDepartments() in the code behind has all the database connections and is linked to a stored procedure.All it does is return Department Names' and Ids', ie then bind them to a dropdownlist.My question is this I have seen Class files - I want to know if I can put this type of information in there and just call it whereever I need it in the site and then bind to whichever dropdownlist I need to?I have had a look around the net and even saw some examples by scott mitchell - but it used datasets (.xsd) files etc and dont want to be using them, plus it was a little over my head. Does anyone know of some good simple examples out there that I can follow, or maybe some examples on here?
I have a situation where I need to maintain a large number of related integer values in my ASP.Net 3.5 application. The SortedList seems perfect for this purpose. If this were a Windows app I'd just create a class and setup one method to Set values within the SortedList and another one to Get values out of it.
But being a web app, I'm not entirely sure of the best approach to use. Sure, I could just create one method for Set and another for Get but that doesn't seem very "clean".I thought about creating a UserControl without any visual elements but am not sure if that makes sense.How would you go about implementing such a SortedList in your web app?
I want to build a reusable library of User Controls.
I found this article:
While it works for me, but I find it a bit cumbersome to implement, expecially for future maintenance.Also, I noticed that if you create the User Control with code in separate file, it will not work. In this case, you will not get any error, but, the page where the control in registerted will not show (you will get blank page).Why I am getting BLANK result when I develop the User Control with code in separate file ?I appreciate your recommendation on the best approach to implement a library of Reusable User Controls. Also, I did not like the method of Web Controls, becuase they are difficult to implement.
In .NET land what would be a good approach for quick prototyping of a concept (i.e. development just on my PC) that could then be extended out to product (users across LAN/WAN), BUT in a fashion that the model/business logic code and data access layer code can be used as is? One thought for example I had as to do: (a) WinForms with business logic and Entity Framework layer to SQL Server Express on my PC, then (b) Go then to ASP.net (using the business logic / data library) with SQL Server/IIS