Web Forms :: How To Use Classes In Css File In Usercontrol Page
Sep 15, 2010I don't know how can i use my css file in user control page.
View 4 RepliesI don't know how can i use my css file in user control page.
View 4 RepliesCan I use VB and C# classes together in the same asp.net 3.5 project?
View 3 RepliesIf I included a page class into a namespace the Profile page property becomes undefined.Why and how to solve this problem.For example I want to include my pages classes into a namespace MyProject.UI.
View 2 RepliesI've been tinkering for hours and I can't figure this out. Seems like it should be pretty straight-forward. Is it possible to use reflection to get a reference to a partial page class given the page's name and path so that I can iterate through the page and examine its controls? I am not looking to examine the currently loaded page, but another page within the same website.
View 4 Repliesi have found the following code in one of the web applications. Is it possible to have an aspx page inherits from two different classes?
<%@ page language="C#" masterpagefile="~/email/EmailMasterPage.master" inherits="email_PassReset, App_Web_klsfx623" stylesheettheme="email" %>
i dont see any class declared for App_Web_klsfx623 in the code behind. dont know what is this?
Im sing a master page with a navigator. How should i make the navigation link change css class to "selected" to show which page you are on?
View 1 RepliesI am new to LINQ. when we drag tables we get a dbml file and designer file.
For example DataClasses1.dbml and DataClasses1.designer.cs.
Once we have them then we can start using our LINQ Queries.
In my company project I do not see this designer files and instead there are .tt files which were used as templates to greate ABC.generated.cs files. Is this same as designer class?
I am following the Nerd Dinner tutorial as I'm learning ASP.NET MVC, and I am currently on Step 3: Building the Model. One part of this section discusses how to integrate validation and business rule logic with the model classes. All this makes perfect sense. However, in the case of this source code, the author only validates one class: Dinner.
What I am wondering is, say I have multiple classes that need validation (Dinner, Guest, etc). It doesn't seem smart to me to repeatedly write these two methods in the partial class:
[code]....
This doesn't "feel" right, but I wanted to check with SO to get opinions of individuals smarter than me on this. I also tested it out, and it seems that the partial keyword on the OnValidate method is causing problems (understandably so). This doesn't seem possible to fix (but I could very well be wrong).
Is there any software for the same? I didn't find any useful information on the internet so asking here.
View 4 RepliesI have a wsdl file, and Im generating proxy classes by this file. But if I use soap header proxy class was not generated correctly!
[Code]....
[Code]....
[Code]....
[Code]...
I don't know if this has to do with how FindControl works or how scope works. But my base class is having a hard time seeing the fields of child classes. Currently I'm planning have the derived class set a property in the base class, but there are a lot of derived classes, so that isn't a very attractive solution.
[code]....
Does putting multiple classes in one file impact performance? Has anyone had any experience with this.
I've read various discussions around application structure and logic of where code can be found with regard to design best practice but little has been said as whether there is any negative/positive/neutral impact on performance.
I am implementing a simple complex number calculator web service. I am trying to pass an object from the service to the client. I declared a single complexnumber class in my .asmx file, I later use this class in webmethods
[Code]....
[Code]....
[Code]....
[Code]....
I want to create two partial classes for the single aspx file. I am using vs2005 dotnet 2.0. i could not able to access method from one partial class in another partial classes.
Partial class 1 : my main aspx page
public partial class _Default : System.Web.UI.Page
{[code]...
i could not able to access meth method in partial class 2
This is page load
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{ [code]...
But in my ascx.cs when IButton1_Click is trigered My name is null
private string _sname;
protected void Page_Load(object sender, EventArgs e)
{ [code]...
im creating site with usercontrols. I have repeater, inside it is another repeater with usercontrol. My problem is passing BindedValue to usercontrol.Bindings works fine and binds the value i need but it cannot pass the value to usercontrol. When i type it manually it works, when i bind it, it passes null (!).I've tried get,set, functions (ondatabound, onload, oninit), accessing control from code with no luck. Ive read and tried to do all the google solutions but with no luck. (even with creating usercontrol inheritance)
View 5 RepliesI'm curious as to what people consider better practice, between duplicating model structure in the view model and using a mapping tool to move data between the two, or aggregate the model inside the view model, i.e. have a property on the view model class that is a reference to the actual model. Which is considered a better approach in general?
View 1 RepliesWhat is the proper way to set the selectedvalue of a DDL inside a web user control? My current structure is PAGE > USERCONTROL [FORMVIEW] > USERCONTROL [DROPDOWNLIST]Inside my FORMVIEW user control, I am setting the value of my DROPDOWNLIST user control through an exposed property located within the DROPDOWNLIST user control, called SelectedLocation. However when I changeMode of the FORMVIEW control, depending on where I call my method to bind myROPDOWNLIST, it will either bind it twice or won't bind it all.
View 6 Repliesi have some usercontrols in "~/Pages/"
my URL will be like ~/Default.aspx?p=Login or ~/Default.aspx?p=ContactUser
now i need to get the QueryString("p") and depend of that i want to load my UserControl To the Default.aspx Page
There are 2 UserControls UC1 and UC2, and there is one more class C. I want to share the same instance of c in both UserControls. I know that this can be possible with properties in both UC's and by registering UC2 in UC1 or vice versa. But I want the solution to be loosely coupled. Any best possible way without touching the Actual Page (which hosts UC's)? So i need some best possible way between UCs transfering C.
View 5 RepliesI have been trying to find a way to declare two classes using page directive, but it seems like mvc framework doesnt support it.
I have got :
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<ContactManager.Models.contact>>" %>
which shows the list of the contacts including edit delete and create option.
What I need to declare another model class which is FileRepository.cs for uploading files on the same page. In this case the page directive should be like:
2. <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<ContactManager.Models.FileDescription>>" %>
Is there any way I can incorporate both into one as the first is coming from the database.
I am developing a usercontrol, in this case a toolbar. Some of the buttons on the toolbar will interact with other objects on the page which are not part of the toolbar. (In this case a map) So the toolbar code behind wants to say something like this:
[code]....
My problem is that MyMap does not exist in the design environment of the usercontrol and therefore produces an error when it is referenced. So my question is, How is this typically handled? Can the usercontrol reference another control that does not exist within itself?
In my Desktop i am binding Multiple UserControls. Each control has the Refresh facility. Is it possible to do refresh the particular UserControl with out page Refresh...
and one Important thing is I am binding User Controls dynamically..( in serverside while page loading)
i have created a usercontrol that get some input from the user in the textbox. now i want to get that value in my page containing the same user control.
View 3 Repliesi have user controls inherits from base user control like this:
[Code]....
How do i insert CustomerSendMail & UserSendMail into aspx page?
Note: The derived user controls having the same control layout as the base user control. Making copies of ascx page for CustomerSendMail & UserSendMail is not good idea, because if i modify the base's ascx page, the old CustomerSendMail & UserSendMail 's ascx page should be replace with the new one.