Naming A Value Combined "getter/setter" Method (WebForms & Binding)

Apr 29, 2010

I'm currently working on. I don't have a compsci degree so I don't know what to call this.I have a method called TryToGetSetValue(Direction direction, object value, object valueOnFail)

public enum Direction
{
ModelToForm,
FormToModel

View 2 Replies


Similar Messages:

Mvc Views Not Found When Using Combined With Webforms CMS

Apr 28, 2010

We have a website build in the umbraco 4.1 cms (webforms) default .net 3.5 And we have some MVC tools and controls build with MVC2.0 on net 4.0 i've managed to let the umbraco cms run in .net 4.0 and i've been following parts of this guide (for mvc 1.0 and umbraco 4.0.3) but now i'm stuck, umbraco has alot of url management itself, so i use the urlRewriting.net (included in umbraco) to redirect a certain url, to [URL] for example. i know the url rewriting works (if i force an error into the mvc.ashx i recieve it in the browser window. but each time it gets to the ProcessRequest it throws a "resource not found" error to the screen here is the full code for mvc.ashx that i use

<%@ WebHandler Language="C#" Class="mvc" %>
using System.Web;
using System.Web.Mvc;
public class mvc : IHttpHandler
{
public void ProcessRequest(HttpContext httpContext)
{
string originalPath = httpContext.Request.Path;
string newPath = httpContext.Request.QueryString["mvcRoute"];
if (string.IsNullOrEmpty(newPath))
newPath = "/";
HttpContext.Current.RewritePath(newPath, false);
IHttpHandler ihh = (IHttpHandler)(new MvcHttpHandler());
ihh.ProcessRequest(HttpContext.Current);
HttpContext.Current.RewritePath(originalPath, false);
}
public bool IsReusable
{
get { return false; }
}
}

here is the web.config that i use

<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="urlrewritingnet" restartOnExternalChanges="true" requirePermission="false" type="UrlRewritingNet.Configuration.UrlRewriteSection, UrlRewritingNet.UrlRewriter" />
<section name="microsoft.scripting" type="Microsoft.Scripting.Hosting.Configuration.Section, Microsoft.Scripting, Version=0.9.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" />
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<section name="umbraco.presentation.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</sectionGroup>
<section name="clientDependency" type="ClientDependency.Core.Config.ClientDependencySection, ClientDependency.Core"/>
<section name="UmbracoExamine" type="UmbracoExamine.Core.Config.UmbracoExamineSettings, UmbracoExamine.Core"/>
<section name="ExamineLuceneIndexSets" type="UmbracoExamine.Providers.Config.ExamineLuceneIndexes, UmbracoExamine.Providers"/>
</configSections>
<urlrewritingnet configSource="configUrlRewriting.config" />
<microsoft.scripting configSource="configscripting.config" />
<clientDependency configSource="configClientDependency.config" />
<UmbracoExamine configSource="configExamineSettings.config" />
<ExamineLuceneIndexSets configSource="configExamineIndex.config" />
<appSettings>
<add key="umbracoDbDSN" value="server=sander_pcSQLEXPRESS;database=database;user id=username;password=password" />
<add key="umbracoConfigurationStatus" value="4.1.0.betaII" />
<add key="umbracoReservedUrls" value="~/config/splashes/booting.aspx,~/install/default.aspx,~/config/splashes/noNodes.aspx" />
<add key="umbracoReservedPaths" value="~/umbraco,~/install/" />
<add key="umbracoContentXML" value="~/data/umbraco.config" />
<add key="umbracoStorageDirectory" value="~/data" />
<add key="umbracoPath" value="~/umbraco" />
<add key="umbracoEnableStat" value="false" />
<add key="umbracoHideTopLevelNodeFromPath" value="true" />
<add key="umbracoEditXhtmlMode" value="true" />
<add key="umbracoUseDirectoryUrls" value="false" />
<add key="umbracoDebugMode" value="true" />
<add key="umbracoTimeOutInMinutes" value="20" />
<add key="umbracoVersionCheckPeriod" value="7" />
<add key="umbracoDisableXsltExtensions" value="true" />
<add key="umbracoDefaultUILanguage" value="en" />
<add key="umbracoProfileUrl" value="profiler" />
<add key="umbracoUseSSL" value="false" />
<add key="umbracoUseMediumTrust" value="false" />
<add key="umbracoContentXMLUseLocalTemp" value="false"/>
</appSettings>
<system.net>
<mailSettings>
<smtp deliveryMethod="SpecifiedPickupDirectory">
<specifiedPickupDirectory pickupDirectoryLocation="c:mail" />
</smtp>
</mailSettings>
<!--
<mailSettings>
<smtp>
<network host="127.0.0.1" userName="username" password="password" />
</smtp>
</mailSettings>
-->
</system.net>
<!-- REMOVE FOR BETA -->
<!-- added by NH to test foreign membership providers-->
<connectionStrings>
<remove name="LocalSqlServer" />
<!--<add name="LocalSqlServer" connectionString="server=.sqlexpress;database=aspnetdb;user id=DBUSER;password=DBPASSWORD" providerName="System.Data.SqlClient"/>-->
</connectionStrings>
<system.web>
<!-- <trust level="Medium" originUrl=".*" />-->
<customErrors mode="Off" />
<trace enabled="true" requestLimit="10" pageOutput="false" traceMode="SortByTime" localOnly="true" />
<sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes" cookieless="false" timeout="20" />
<globalization requestEncoding="UTF-8" responseEncoding="UTF-8" />
<xhtmlConformance mode="Strict" />
<httpRuntime requestValidationMode="2.0" />
<pages enableEventValidation="false">
<!-- ASPNETAJAX -->
<controls>
<add tagPrefix="umbraco" namespace="umbraco.presentation.templateControls" assembly="umbraco" />
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</controls>
<namespaces>
<!-- ASP MVC -->
<add namespace="System.Web.Mvc"/>
<add namespace="System.Web.Mvc.Ajax"/>
<add namespace="System.Web.Mvc.Html"/>
<add namespace="System.Web.Routing"/>
<add namespace="System.Linq"/>
<add namespace="System.Collections.Generic"/>
</namespaces>
</pages>
<httpModules>
<!-- URL REWRTIER -->
<add name="UrlRewriteModule" type="UrlRewritingNet.Web.UrlRewriteModule, UrlRewritingNet.UrlRewriter" />
<add name="umbracoRequestModule" type="umbraco.presentation.requestModule" />
<!-- UMBRACO -->
<add name="viewstateMoverModule" type="umbraco.presentation.viewstateMoverModule, umbraco" />
<add name="umbracoBaseRequestModule" type="umbraco.presentation.umbracobase.requestModule, umbraco" />
<!-- CLIENT DEPENDENCY -->
<add name="ClientDependencyModule" type="ClientDependency.Core.Module.ClientDependencyModule, ClientDependency.Core"/>
<!-- ASP MVC -->
<add name="RegisterRoutesModule" type="RegisterRoutesModule"/>
</httpModules>
<httpHandlers>
<remove verb="*" path="*.asmx" />
<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
<!-- UMBRACO CHANNELS -->
<add verb="*" path="umbraco/channels.aspx" type="umbraco.presentation.channels.api, umbraco" />
<add verb="*" path="umbraco/channels/word.aspx" type="umbraco.presentation.channels.wordApi, umbraco" />
<!-- CLIENT DEPENDENCY -->
<add verb="*" path="DependencyHandler.axd" type="ClientDependency.Core.CompositeFiles.CompositeDependencyHandler, ClientDependency.Core "/>
<!-- SPELL CHECKER -->
<add verb="GET,HEAD,POST" path="GoogleSpellChecker.ashx" type="umbraco.presentation.umbraco_client.tinymce3.plugins.spellchecker.GoogleSpellChecker,umbraco" />
<!-- ASP MVC -->
<add verb="*" path="*.mvc" validate="false" type="System.Web.Mvc.MvcHttpHandler, System.Web.Mvc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</httpHandlers>
<compilation defaultLanguage="c#" debug="true" batch="false" targetFramework="4.0">
<assemblies>
<add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="System.Data.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<!-- ASP MVC -->
<add assembly="System.Web.Mvc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Web.Routing, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Web.Abstractions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</assemblies>
</compilation>
<authentication mode="Forms">
<forms name="yourAuthCookie" loginUrl="login.aspx" protection="All" path="/" />
</authentication>
<authorization>
<allow users="?" />
</authorization>
<!-- Membership Provider -->
<membership defaultProvider="UmbracoMembershipProvider" userIsOnlineTimeWindow="15">
<providers>
<clear />
<add name="UmbracoMembershipProvider" type="umbraco.providers.members.UmbracoMembershipProvider" enablePasswordRetrieval="false" enablePasswordReset="false" requiresQuestionAndAnswer="false" defaultMemberTypeAlias="Another Type" passwordFormat="Hashed" />
<add name="UsersMembershipProvider" type="umbraco.providers.UsersMembershipProvider" enablePasswordRetrieval="false" enablePasswordReset="false" requiresQuestionAndAnswer="false" passwordFormat="Hashed" />
</providers>
</membership>
<!-- added by NH to support membership providers in access layer -->
<roleManager enabled="true" defaultProvider="UmbracoRoleProvider">
<providers>
<clear />
<add name="UmbracoRoleProvider" type="umbraco.providers.members.UmbracoRoleProvider" />
</providers>
</roleManager>
<!-- Sitemap provider-->
<siteMap defaultProvider="UmbracoSiteMapProvider" enabled="true">
<providers>
<clear />
<add name="UmbracoSiteMapProvider" type="umbraco.presentation.nodeFactory.UmbracoSiteMapProvider" defaultDescriptionAlias="description" securityTrimmingEnabled="true" />
</providers>
</siteMap>
</system.web>
<applicationSettings>
<umbraco.presentation.Properties.Settings>
<setting name="umbraco_com_regexlib_Webservices" serializeAs="String">
<value>http://regexlib.com/WebServices.asmx</value>
</setting>
</umbraco.presentation.Properties.Settings>
</applicationSettings>
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<modules>
<remove name="UrlRewriteModule"/>
<remove name="umbracoRequestModule"/>
<remove name="viewstateMoverModule"/>
<remove name="umbracoBaseRequestModule"/>
<remove name="ScriptModule"/>
<remove name="ClientDependencyModule"/>
<!-- URL REWRTIER -->
<add name="UrlRewriteModule" type="UrlRewritingNet.Web.UrlRewriteModule, UrlRewritingNet.UrlRewriter" />
<!-- UMBRACO -->
<add name="umbracoRequestModule" type="umbraco.presentation.requestModule, umbraco" />
<add name="viewstateMoverModule" type="umbraco.presentation.viewstateMoverModule, umbraco" />
<add name="umbracoBaseRequestModule" type="umbraco.presentation.umbracobase.requestModule, umbraco" />
<!-- ASPNETAJAX -->
<add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</modules>
<handlers accessPolicy="Read, Write, Script, Execute">
<remove name="WebServiceHandlerFactory-Integrated" />
<remove name="ScriptHandlerFactory" />
<remove name="ScriptHandlerFactoryAppServices" />
<remove name="ScriptResource" />
<!-- ASPNETAJAX -->
<add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add name="ScriptResource" verb="GET,HEAD" path="ScriptResource.axd" preCondition="integratedMode" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<!-- UMBRACO CHANNELS -->
<add verb="*" name="Channels" path="umbraco/channels.aspx" type="umbraco.presentation.channels.api, umbraco" />
<add verb="*" name="Channels_Word" path="umbraco/channels/word.aspx" type="umbraco.presentation.channels.wordApi, umbraco" />
<!-- CLIENT DEPENDENCY -->
<add verb="*" name="ClientDependency" path="DependencyHandler.axd" type="ClientDependency.Core.CompositeFiles.CompositeDependencyHandler, ClientDependency.Core "/>
<!-- SPELL CHECKER -->
<add verb="GET,HEAD,POST" name="SpellChecker" path="GoogleSpellChecker.ashx" type="umbraco.presentation.umbraco_client.tinymce3.plugins.spellchecker.GoogleSpellChecker,umbraco"/>
</handlers>
</system.webServer>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
and the routing file
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
public class RegisterRoutesModule : IHttpModule
{
public void Init(HttpApplication application)
{
RegisterRoutes(RouteTable.Routes);
}
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
if (routes["Default"] == null){
routes.MapRoute(
"Default",
"{controller}.aspx/{action}/{id}",
new { action = "Index", id = "" }
);
}
routes.MapRoute(
"Root",
"",
new { controller = "Home", action = "Index", id = "" }
);
}
public void Dispose()
{
}
}

i have very few knowledge of mvc, though i am a certified umbraco developer. what i suspect is that there are some routing issues, and the views folder is not found or something like that.

View 1 Replies

MVC :: Default HomePage In Combined WebForms Website Not Working

Feb 25, 2010

We are starting to add some MVC pages to our exsiting WebForms website. When people type in[URL] they get a 404. If they type in[URL] then it works.

We are running Windows Server 2008 R2 with IIS 7.5. The default document is set in IIS.

The 404s started when we introduced MVC, so routing must be the guilty party here.

Here is my Global.aspx.cs.RegisterRoutes method

[code]....

View 6 Replies

C# - How To Implement Validations In Setter Of Properties

Jun 8, 2010

I want to implement validations in setter of properties.

how I will do validations before setting value. but not getting what to do if passed value is not correct. Just not setting is not a acceptable solution as I want to return an appropriate message to user (in a label in web form). My example code is:

[code]....

A thought was to use return but it is not allowed.

Throwing error looks not good as generally we avoid thorwing custom errors.

View 4 Replies

FluentNHibernate Convention/:Could Not Find A Setter For Property Children

Jul 25, 2010

Here's mt entity:
Csharp Code:
using System;using System.Collections.Generic;using System.Linq;namespace Venue.Domain{ using Venue.Infrastructure.Domain; public class Forum : Entity { private IList<Forum> children = new List<Forum>(); private IList<Moderator> moderators = new

[code]....

Here's my class map:

Csharp Code:
using FluentNHibernate.Mapping;namespace Venue.Persistence.Mapping{ using Venue.Domain; public class ForumMap : ClassMap<Forum> { public ForumMap() { Id(x => x.Id); Map(x => x.Sequence); Map(x => x.Title);

[code]....

And here's my convention:

Csharp Code:
using FluentNHibernate.Conventions;using FluentNHibernate.Conventions.Instances;namespace Venue.Persistence.Mapping.Conventions{ public class ReferenceConvention : IReferenceConvention { public void Apply(IManyToOneInstance instance) { instance.Column(instance.Property.Name + "Id"); } }}

I get the following message:Could not find a setter for property Children ...

View 2 Replies

C# ASP.NET Binding Controls Via Generic Method?

Apr 30, 2010

I have a few web applications that I maintain and I find myself very often writing the same block of code over and over again to bind a GridView to a data source. I'm trying to create a Generic method to handle data binding but I'm having trouble getting it to work with Repeaters and DataLists.

Here is the Generic method I have so far:

[code]....

That way I can just define my CommandText then make a call to "BindControls(myGridView, cmd)" instead of retyping this same basic block of code every time I need to bind a grid.

The problem is, this doesn't work with Repeaters or DataLists. Each of these controls inherit their respective "DataSource" and "DataBind" methods from different classes. Someone on another forum that I implement an interface, but I'm not sure how to make that work either.

The GridView, Datalist and Repeater get their respective "DataBind" methods from BaseDataBoundControl, BaseDataList, and Repeater classes. How would I go about creating a single interface to tie them all together? Or am I better off just using 3 overloads for this method?

View 2 Replies

C# - Is A New Object That's Created In A Static Property Getter Only Created Once

Jan 11, 2010

I'm creating a static helper class for web services I'm writing. I'm tapping into the API of Telligent and therefore creating these Telligent "service" objects that allow me to do things with the platform. For example, I'm creating a MembershipSerice object in my helper class so I can do membership stuff with the same object. In my helper class I have a property with a getter that creates a new one of these objects:

private static MembershipService _MembershipService {
get return new MembershipService(path, usr, pwd);
[code]...

View 3 Replies

MVC :: Binding Class On Action Method Using Default Model Binder

Nov 7, 2010

I saw a post with posibble problems with Model Binding which is mentioned here. [URL]. Whats the best approach to this? Different approaches are below.
[Code]....

View 2 Replies

Can Cache The Combined Script

Mar 9, 2010

I am building a AJAX intensive web application (using ASP.NET, JQuery, and WCF web services) and am looking into building an HTTP Handler that handles script combining and compression for my JavaScript files and my CSS files. I know not combining the scripts is generally a less preferred approach, and I'm sure it's probably the way I will end up going, but my question is this...Since so many of my JS files are due to the controls I use don't they get cached by the browser after the first load anyway? Since so many of these controls can be found on many of the pages of my web application is it actually faster to combine all of my scripts and serve that one file (which will vary for every page) or to serve the individual files which will get cached? I guess what I'm getting at is, by enabling script combining am I now losing part of the caching ability of the browser? I know I can cache the combined script, but the combined script will be different for every page whereas with the individual control scripts each one will be cached and the number of new scripts will be minimal for each page call.

View 4 Replies

AJAX :: Combined AXD Files?

Feb 7, 2011

Why do I have so many AXD files downloaded...Reducing the number of components in turn reduces the number of HTTP requests required to render the page. This is the key to faster pages. How do I make only one AXD file to be download by the user?hOW DO i MAKE ONLY ONE js FILE ...?

View 3 Replies

How To Make A Set Up With C# And Combined With SQL Server 2005

Oct 3, 2010

am confuse to make setup in following points,1. what is the connection string (basically the server name) to run it on various system.2. what is the actual steps for doing this.3. what files we have to save in our setup and how .4. what software (viz. .net , sql)we needed to install into a system that have no sql server and .net; Can be any alternative in our setup to install these required setup automatically, when my setup run.

View 1 Replies

Use Combined Query When No Of Field Are Uncertain?

Feb 14, 2011

Here is idea i have 6 different fields to allow search if i give the option for user to enter value in any of 6 option or enter combined fields how to use sql query to retrieve the value.

View 1 Replies

MVC :: DisplayTemplate And EditorTemplate Naming?

Feb 23, 2010

I've got a couple of questions about the naming convention for the DisplayTemplates and EditorTemplates in MVC 2.

If for example I have a customer object with a child list of account how do I:

Create a display template for the list of accounts, what is the file called?When I'm doing a foreach( var c in Model.Accounts ) how do I call a display temple while in the foreach? When I do Html.DisplayFor( x => x ) x is the model and not in this case "c".

View 1 Replies

Naming Conventions For Controls

Mar 15, 2010

There is a conflict b/w our team members about following the naming conventions. We have downloaded a document that specifies the naming conventions for the ASP.NET controls. But it does not covers all ASP.NET 2.0 controls, so there is basically a fight
over the naming conventions of the controls that are not specified in that document. Take for example : GridView Control, the naming convention for this control is not defined in the document, so I suggested 'gvw' for the prefix name but my team mates are
suggetsing 'gv' for that purpose. I had somewhere read before that the naming convention should contain either three or four letters of a control like TextBox can have 'txt' and ImageButton can have 'ibtn' as the identifying name as prefix.

View 3 Replies

C# - Naming Conventions For Controls?

Jan 2, 2011

While working with VS by default the editor generates this:

<asp:Button ID="Button1" runat="server" Text="Button" />

Now the ID generated is Button1 i.e First letter capital. My questions is what is the best way to name the controls ?

SubmitButton
btnSubmit

or something else?

Which naming convention is considered good ?

View 4 Replies

AJAX :: Adding To ToolkitScriptManager Combined Scripts?

Jan 6, 2011

I need to $create Ajax Control Toolkit extenders (i.e. DropDown Extender) manually in JavaScript. To do so, the appropriate ACT scripts need to be loaded (i.e. DropDown.DropDownBehavior.js) manually since they are not declared in the page.

Prior to 3.5, I was loading these using the ScriptManager

[Code]....

My manually added DropDownBehavior.js script is loaded **before** the combined script containing all the ACT base classes resulting in a Value cannot be undefined. Parameter name: baseType

error in JavaScript. If I manually load the base types before DropDown.DropDownBehavior.js, I get Sys.InvalidOperationException:

Type Sys.Extended.UI.BehaviorBase has already been registered.

Is there some way to add these scripts either after the `_TSM_CombinedScripts_` or append to the end of it?

View 3 Replies

AJAX :: CalendarExtender Combined With MaskedEditExtender Not Working

Feb 16, 2010

I have a textbox with a calendar extender.

When a date on the calendar is clicked the textbox is filled with the date value in format: dd-mm-yyyy That works...but now I added a MaskedEditExtender on that same textbox field. Now when a date in the calendar extender is clicked the focus is set on the textbox field, the mask shows, but the values are not filled in!

I also checked this post:[URL]but that didn.

Here's my code

[code]....

View 8 Replies

MVC :: Returning Custom Or Combined Query With Linq?

Feb 2, 2010

I have a simple model that contains about 6 tables dealing with customers. As long as I am dealing with one table at a time or returning the single or list of an entire class everything is great. I am struggling with having to return subsets or combinations of the class information. For example customer sales by year.

This query involves these classes:

Customer
CustomerOrder

I need to return something like

CustomerName
Year
TotalSales

I can build the query fine. Returning that to a model is what puzzles me. I have no class that I form a generic.list with and nothing to inherit on the view. What is the best way to handle this?

View 4 Replies

AjaxControlToolkit ToolkitScriptManager Cache Combined Js On Client?

Apr 13, 2010

Usual javascript files can be cached on a client-side if web server sets the expiration. If user has once downloaded it, it will be cached by his browser.And what about AjaxControlToolkit ToolkitScriptManager? Are combined JS files cached on a client? How can expiration time be managed?

View 1 Replies

Security :: Authorization Setting For Combined Applications?

Sep 22, 2010

I am working on a scenario where I need to combine three applications into one (Project Requirement). I link the three applications on a web page and which ever link is clicked, I redirect it to that page.

My application sturcture looks as below

MainPage

- Folder1 with App1 (uses Active Directory group for authentication)

- SubPages

- Folder2 with App2 (Uses Membership roles and users)

- SubPages

- Folder3 with App3 (Uses Other logins for oracle database)

- SubPages

Is it possible to provide authorization only for my App2 based on the role created in membership.

For eg: There is user1 with role1 and user2 with role2 but i need to allow only user1 with role1.

When I was checking this scenario in the ASP.NET configuration settings to modify, it has the allow all permisions which is disabled to modify and it is given that Rules that appear dimmed are inherited from the parent and cannot be changed at this level.

View 1 Replies

Efficiency - NamingContainer Naming Convention?

Mar 1, 2011

I'm working on a project in which the client has required a lot of things to happen on a single page, and this has resulted in a rather large blob of HTML being rendered out to the client browser.

The main issue is with input tags (where runat="server" attribute is set), these tend to cause a drastic increase in markup size due to validation, updatepanel triggers, viewstate, and the control markup itself. I've done what I can to reduce the amount of triggers I'm using, I'm compressing the viewstate (to something like 8% of the original viewstate size), I've gotten rid of a lot of ASP.NET Validators and rolled my own, and and I've been using ClientIdMode to reduce the length of the ID attributes of many asp.net elements. All of these combined significantly reduces the amount of HTML being sent to the client, (for example going from 2 megabytes for a request down to 500-600 kb - these are HUGE pages, mind you).

[Code]....

View 2 Replies

C# - DAL And BLL Naming Conventions Other Peoples Alternatives?

Jul 12, 2010

peoples naming conventions for DAL and BLL if there were any better names for them than those ones.

View 2 Replies

Session Object Not Work With Combined Mvc And Webform Application?

Jan 21, 2010

Environment used - Asp.net mvc 1.0 with c#

Problem -I have used simple mvc application. and also added webform into mvc application.and it is working fine. but when i used session object for sharing data between mvc and webapplication. it is not working. I have put Session["logon"] = "logon"; object into mvc controller and when i access this into webform then there is no value in session object.

View 2 Replies

Jquery And Updatepanel : Binding Jquery Method At A Common Place?

Mar 17, 2011

I am using multiple user control in my web page. Each of these usercontrol has $(document).ready() method. Because i am using an update panel, i am binding all the events again in end_request event. But I dont want to do that in all my usercontrols. Is is possible to do this at a common place(only once)?

View 1 Replies

Web Forms :: ObjectDataSource Does Not Have A Naming Container Error

Apr 21, 2010

I have done my searching and haven't found anything related to my issue. I have an aspx page that contains a regular drop down control. When the selectedIndex is changed, it fires off a post back and also rebinds a datalist based on its value. Inside the datalist I have an ascx control which has a gridview and an object datasource:

ASPX page:

[Code]....

My problem is that after my drop down posts back, when the process gets to DataList1.databind (in the selected index changed) i get a "The ObjectDataSource control 'ObjectDataSource1b' does not have a naming container. Ensure that the control is added to the page before calling DataBind." error.

During the post back, the pageload on my control runs and all my properties seem to have its values.

View 5 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved