I'm using VB.Net, Visual Studio 2010 Ultimate and developing an ASP.MVC 2 application.
I have an module that defines some extensions to the String class. In a WinForm application, I would simply use a Imports statement to include my String extension module into my class. But, in Views, the compiler complains when I try doing that.
What I would like to have is a mapping between a custom file extension to a class that is not System.Web.UI.Page but a class of mine that inherits from System.Web.UI.Page.
i.e.:
*.aspx -> System.Web.UI.Page *.my -> My.Package.MyClass (inherits from System.Web.UI.Page)
I know I can map any extension to be treated like .aspx but I can't find the way to do what I have in mind.
I would like to ask a plain and simple question about the Model-View-Controller architecture - should the UML Class diagram for my application include all the controllers and views and their relationships, or should it just include my model classes, i.e. the entities that are the heart of the application, you know - like in an ordinary application - i.e. User, Administrator, Student, Teacher, Course, Grade etc...?
I am learning MultiView control.Here are question:I added 5 views in the MultiView but all views are tight together. I can not drag and drop another control such as text boxes or labels into view area.
I have an MVC view that contains a number of partial views. These partial views are populated using partial requests so the controller for the view itself doesn't pass any data to them. Is it possible to reload the data in one of those partial views if an action was triggered in another? For example, one partial view has a jqGrid and I want to refresh the data in another partial view when a user selects a new row in this grid. Is there a code example for this scenario (in C#) that I can look at to see what am I doing wrong? I am using ajax calls to trigger a new request but non of the partial views are refreshed so I am not sure if the issue is with the routing, the controller,
I'd like to learn how this project works, but each time I try to debug, it throws an error saying 'Error creating control xaml1, unknown server tag asp.SilverLight'. what does this mean? What do I need to do to make this work?
What are pros to use extension-less url? in any terms. like [URL] to [URL] and is it possible to have extension-less url for every page? Update: Is extension less url better for site security?
Since we can access the private data member of base class in the derived class with the help of friend function. How can we do the same in C# asp.net? I mean whats the alternative of friend function in C# asp.net
Using the following Webservice definition using aClientArgs as a complex type:
[System.Web.Script.Services.ScriptService] public class Controller : System.Web.Services.WebService { [WebMethod] public void save_client(aClientArgs client) { // Save client data } } Then defining aClientArgs as a sub-class: public class aArgs { public string id = null; public string name = null; } public class aClientArgs : aArgs { public string address = null; public string website = null; } Returns the following WSDL fragment for the save_client args: <save_client xmlns="http://tempuri.org/"> <client> <address>string</address> <website>string</website> </client> </save_client> When I'm expecting the following: <save_client xmlns="http://tempuri.org/"> <client> <id>string</id> <name>string</name> <address>string</address> <website>string</website> </client> </save_client>
So it appears that the .NET WebService is not treating inherited properties as arguments/variables for purposes of a web service. How do I get .NET to also use the properties of the base class?
I first need to apologize in case this has been answered before but I'm a newbie (green as they come) and this error keeps popping up even before I start debugging! There are two errors and the second one is:" Error 2
Missing partial modifier on declaration of type 'WFPKenya2.WFPKenya2'; another partial declaration of this type exists"
I have this Control directive in a usercontrol (i've changed the namespace and class name):
<%@ Control Language="C#" AutoEventWireup="true" Inherits="Namespace.Path.To.ClassName" %> <asp:TextBox runat="server" ID="txtComment" TextMode="MultiLine" ValidationGroup="comment" /> ClassName is a class that lives in a class library and this is the class: namespace Namespace.Path.To { public class ClassName : System.Web.UI.UserControl { protected System.Web.UI.WebControls.TextBox txtComment; protected void Page_Load(object sender, EventArgs e) { HttpContext.Current.Response.Write(txtComment == null); HttpContext.Current.Response.End(); }
I'd like to inherit all my controllers from a custom base class that I write myself. I can change the line every time I add a new controller, but it would be nicer if I could somewhere specify the default value that gets set there. That way I wouldn't need to worry about forgetting this, and other people who get added to the project later on would have an easier time.
am using class diagram of visual studio 2008as you can see the image i need show to user that the period and calendar classes have the idMarket property that refers to market classhow can i do this?
I have build a UserControl with separate code behind file.In that code behind file i have defined some public properties in the Partial class of user control that was automatically generated.Those properties will initialize some properties of controls that are used in the control.Now, in .aspx page i used this User Control and initialized the public properties through code behind of aspx page for dynamic contents.
In my MVC project, I am trying to setup a base product class that will be inherited by a more specific class later. Here is my scenario. I have a table called ProductBase, it contains three fields, BaseProductId(PK), CatalogNum, and ListPrice. Every product in the system will share these attributes. Next, I have a table called Shirt, with three fields BaseProductId(PK, FK), Color, and Size.
I then setup an Entity Data Model that pulled in both of these tables and created classes BaseProduct and Shirt. So, in my model, I want to do something like this:
[Code]....
The main problem I have with this, is that if I do any kind of condition on CatalogNum or ListPrice, then my performance goes to crap. One of the main things we will want to do is something like this:
[Code]....
This takes an enormous performance hit, and I suspect it is because the partial class above returns to the database for each shirt.
The other problem I have with this approach, is that I cannot force the properties for the Shirt. What if I make a change to the BaseProduct? What happens when I have multiple product types, will I have to repeat this code? I assume I will need to make a change with the entity data model, but I am unsure where to begin.
I am using Tuple class in WCF Service. When i add reference to my web project I get Tuple class. Now i want to add an extension method to Tuple<> class in my service which will be accessible in my Web project.