C# - Build Dynamic Clothing - Based Web - Site?

Nov 10, 2010

For comparison: something like the shirt builder application at [URL] Say, if I have fabric image and want to generate base, collar, cuff etc. How should I do it on server side in .NET, and generate different components of shirt.

View 1 Replies


Similar Messages:

MVC - Find Controllers With (Authorize) Attributes Using Reflection In C# Or Build Dynamic Site.Master Menus?

Jun 8, 2010

I'm currently writing a web app in ASP.NET MVC 1.0 (although I do have MVC 2.0 installed on my PC, so I'm not exactly restricted to 1.0) -- I've started with the standard MVC project which has your basic "Welcome to ASP.NET MVC" and shows both the [Home] tab and [About] tab in the upper-right corner. Pretty standard, right? I've added 4 new Controller classes, let's call them "Astronomer", "Biologist", "Chemist", and "Physicist". Attached to each new controller class is the [Authorize] attribute. For example, for the BiologistController.cs

[Authorize(Roles = "Biologist,Admin")]
public class BiologistController : Controller
{
public ActionResult Index() { return View(); }
}

These [Authorize] tags naturally limit which user can access different controllers depending on Roles, but I want to dynamically build a Menu at the top of my website in the Site.Master Page based on the Roles the user is a part of. So for example, if "JoeUser" was a member of Roles "Astronomer" and "Physicist", the navigation menu would say:

[Home] [Astronomer] [Physicist]
[About]

And naturally, it would not list links to "Biologist" or "Chemist" controller Index page. Or if "JohnAdmin" was a member of Role "Admin", links to all 4 controllers would show up in the navigation bar. Ok, you prolly get the idea... Now for the real question... Starting with the answer from this StackOverflow topic about Dynamic Menu building in ASP.NET, I'm trying to understand how I would fully implement this. (I'm a newbie and need a little more guidance, so please bare with me.) The answer proposes Extending the Controller class (call it "ExtController") and then have each new WhateverController inherit from ExtController.

My conclusion is that I would need to use Reflection in this ExtController Constructor to determine which Classes and Methods have [Authorize] attributes attached to them to determine the Roles. Then using a Static Dictionary, store the Roles and Controllers/Methods in key-value pairs. I imagine it something like this:

public class ExtController : Controller
{
protected static Dictionary<Type,List<string>> ControllerRolesDictionary;
protected override void OnActionExecuted(ActionExecutedContext filterContext)
{
// build list of menu items based on user's permissions, and add it to ViewData
IEnumerable<MenuItem> menu = BuildMenu();
ViewData["Menu"] = menu;
}
private IEnumerable<MenuItem> BuildMenu()
{
// Code to build a menu
SomeRoleProvider rp = new SomeRoleProvider();
foreach (var role in rp.GetRolesForUser(HttpContext.User.Identity.Name))
{
}
}
public ExtController()
{
// Use this.GetType() to determine if this Controller is already in the Dictionary
if (!ControllerRolesDictionary.ContainsKey(this.GetType()))
{
// If not, use Reflection to add List of Roles to Dictionary
// associating with Controller
}
}
}

Is this doable? If so, how do I perform Reflection in the ExtController constructor to discover the [Authorize] attribute and related Roles (if any) ALSO! Feel free to go out-of-scope on this question and suggest an alternate way of solving this "Dynamic Site.Master Menu based on Roles" problem. I'm the first to admit that this may not be the best approach.

View 2 Replies

VS 2008 - Restricting Access To Web Pages (on Intranet Site) Based On Role Based Authorization

Jul 12, 2011

I have a simple intranet site. It has a role based authorization in the web.config file.

Any user's in a specific role called as "Apr-Sales-Writers" will be authorized to use those pages. If not, they will not be authorized. So far so good. Works fine. But we added additional functionality where a new active directory group (means new role) has to be added and user's belonging to this new AD group should be given access to only specific .aspx pages on the intranet site. I am using a web.sitemap and it looks like this.

If the user's belong to say AD group "Apr-Sales-Writers", they should access only default.aspx and salesData.aspx pages. User's belonging to new AD group (which I did not include in the web.config file below), should have access to other .aspx pages.

[CODE]<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
<siteMapNode url="default.aspx" title="Home" description="Home">
<siteMapNode title="sales Data" description="sales Data">
<siteMapNode url="salesData.aspx" title="sales Data" description="sales Data" />

[Code] ....

View 7 Replies

Website - Webforms Physical Site Structure With Dynamic Site Map

Feb 2, 2010

I am having a little difficulty trying to wrap my head around site structures. I have quite a large asp.net site, for which: Admins can see a user list, Each user can have many accounts, and for each account can have many items. I can picture this as a breadcrumb trail of editing a particular item. User List > Mr Bob > Accounts > BOB77 > Items > Item32 > Edit

User List = All the users Mr Bob = A user the administrator has selected from the User List Accounts = A list of the user's accounts 12BOB = The administrator has selected the account named 12BOB Items = A list of the items an account contains Item32 = The item that the administrator selected Edit = The action that the administrator wants to do. I can picture how this would look like if it was using ASP.NET MVC with the URL, but I am unsure how to map this out using Webforms, and in the physical filesystem.

This is what I have thought up about how I am guessing the physical structure would look like. Will this have to use session variables to achieve what I am trying to do?

/Users/User/Edit.aspx <- for editing a user
/Users/User/View.aspx <- for viewing a user
/Users/User/Accounts/Default.aspx <- for viewing all accounts
/Users/User/Accounts/Account/View.aspx <- for viewing an account
/Users/User/Accounts/Account/Edit.aspx <- for editing an account
/Users/User/Accounts/Account/Items/Default.aspx <- for viewing all items in an account
/Users/User/Accounts/Account/Items/Item/Edit.aspx <- for editing an item

Where can I read more about this kind of setup in a web application? Or, can someone point me in the direction of an available project that has this kind of layout?

View 1 Replies

Web Forms :: How To Build Site Map

Sep 7, 2010

I have an application that consists of 10 pages. But those pages work with query string, those values iam getting from db. For this type of situation how can i build a sitemap. Those values are not fixed those may be increase.

View 3 Replies

Create Dynamic Data Site And MVC - 2 Site Together

Apr 16, 2010

I have created firstly ASP.NET MVC 2. and write more functionality. After I create asp.NET Dynamic Data Site. now, when I click on run button in Visual Studio, mvc app. opened in browser as [URL]. and asp.NET Dynamic Data Site as [URL]. but i want to merge this app. in one. can I use asp.NET Dynamic Data Site and asp.NET MVC-2 at the same time?

View 1 Replies

Build Proxy Site That Renders Any URL?

Sep 27, 2010

I want to build a proxy site that renders any URL. Given an url, I need to replace all html links, css links and js urls from href="/original.htm" to [URL] sort of. How can I do? is there a ready-to-use framework? I use ASP.NET and C#.

View 1 Replies

C# - A Build And Deployment Machine With A Web-based Dashboard?

Feb 22, 2011

I have my code sitting on Bitbucket (it is a ASP.net web application). I want to put together a build machine that has a web-based dashboard. I go to the dashboard and I say: show me all the branches and stuff on my Bitbucket project. Now get the latest code from this branch for me and build it. Then deploy it to this location for me or maybe this other location. I want this dashboard give me a history of all this builds and deployments too. I am very new to this concept I have been reading about CC.net and MSBuild and other stuff but I can not find.

View 1 Replies

Web Forms :: How To Build A Event Based Calendar

Jan 6, 2010

I want to build a event based calendar .. sorting by mnth,week,day.... also a calendar to display tasks..

For tat i have a masterpage with calendar usercontrol with tasks... and content page with calendar usercontrol with events Now content page displays both calendar with events and with tasks.

Now when i navigate calendar with events ....the calendar with tasks shuld also navigate to same mnth.

for tat i have used public properties in master page to set values to calendar tasks.

and in content page am setting values to properties in master page usign calendar events properties.

am updating the values even on selection changed and visible mnth changed events.

The problem is tat am facing problems with the synchronizing..

i.e if calendar tasks is always having the previous value of calendar events.

Is there any way to synchronize them?

View 1 Replies

ADO.NET :: How To Build Dynamic Linq To SQL Queries

Nov 7, 2010

I'm trying to do something that on the face of it is very simple.

If I have 5 text boxes, and 1 of them is blank, I want to exclude that textbox from the query, rather than searching for where a field is blank.

I've tried to do a bit of research into dynamic linq queries, but have come up empty handed, or what I've found doesn't seem to quite answer my question.

View 3 Replies

Web Forms :: How To Build Site.sitemap At Runtime From DataBase

Apr 18, 2010

I want to have site.sitemap file that is build runtime from my sql database.

View 2 Replies

JQuery :: Build Search Engine In Site Content?

Aug 1, 2010

I would like to create personal web site including search engine in my site content. I don't know algorithem how to build it yet. how to build my own search engine?

View 1 Replies

Web Forms :: Build Multilingual Site Using Globalization And Localization

Jan 16, 2013

How to apply theGlobalization and Localization asp.net with C# ....

View 1 Replies

DataSource Controls :: Build Output Based On Data

May 24, 2010

This is my Table Structure....

OrderNo Itemcode Name AQty BQty

AB1 001 A 50 60
AB1 002 B 50 50
AB1 003 C 50 40
AB1 004 D 100 120
AB1 005 E 100 100
AB1 006 F 100 80
AB2 007 B 100 95

I need The first resultset/Output like This....

OrderNo Itemcode Name AQty BQty Total

AB1 001 A 50 60 -10
AB1 004 D 100 120 -20

I need The Second resultset/Output like This....

OrderNo Itemcode Name AQty BQty Total
AB1 003 C 50 40 10
AB1 006 F 100 80 20
AB2 007 B 100 95 05

I dont need To show 002,005 coz itz Total is zero(0). Herr i need to show Record Based on OrderNo...

View 4 Replies

Can Build ADO.NET Entity Framework Based On MYSQL Database

May 19, 2010

I am using MUSQL Database extensivly in my projects,

can we build ADO.NET entity framework based on MYSQL database?

View 2 Replies

Build A Data Access Layer For New Web Based Application?

May 17, 2010

I was looking to build a Data Access Layer for my new web based application, I'm using ASP.NET. I'm want to build a framework not only for this application but also want to utilize it for my future projects.

Actually my main aim is to make a framework, from DAC, DAL, BL to GUI. I want suggestions from you guys that what should i adopt, what give me flexibility, which suits for both small and large size applications.

View 4 Replies

Web Forms :: Build Web Based Time Tracking Software

Aug 21, 2012

How can i start  webbaseTime Tracking Software ? example is timedoctor.com . i need to save screenshot and time in my applicetion

View 1 Replies

Web Forms :: Build Body Of Email Based On Gridview Selections?

Nov 3, 2010

I have a page that the user can make selection using a checkbox.. at the end of the page, they have the option email those selections to others. So i'd like to loop thru the gridview if they click on the email button, first make sure they made a selection, if no selection then i will prompt them.. if they select 3 records then i need to put those 3 records into the body of the email.. Ive looked around and found some others with the same end result, but none that provided a good example of building that list dynamically for the email body. im using "using System.Net.Mail;" and have the email working fine with hard coded data for the body, i need to connect to the gridview and build the body.. Can anyone offer suggestions, examples or links to a good tutorial?

View 3 Replies

SQL Server :: Trying To Build Dynamic Statement But Doesnt Work When Put Together?

Jan 3, 2011

If i split the statements up they work fine individually.But what im trying to accomplish is to pass in the column name that i want to select from my table.. ill pass it from the page as well as 1 other parameter.

I was looking and found some queries that will return the column name from the table but figured this may work.when i execute this,it returns the actual value in my SET @column line.so in the below code if i run it, it will just return the value "VideoLevel"

BUT if i change it to the example below that,it works..

[Code]...

[Code]...

View 10 Replies

Forms Data Controls :: Easiest Way To Build XML Based Menu With Submenu

Sep 2, 2010

I need to develop an easy and quickly to build menu structure based on xml. The menu needs to have a "Main" menu at top of the screen and a submenu at the left of the screen. Excactly like this: [URL] where i need to get started and wich control i should use?

View 1 Replies

Forms Data Controls :: How To Build Dynamic Sitemap From Database

Jan 25, 2011

i want to build dynamic sitemap from database..even my menu items are also dynamic...and i want do display sitemap having categories and related menu items from database..

so i dont know how to build dynamic site and create dymanic links of that menus and categories..

View 1 Replies

Architecture :: Technology Guidance - Build Site With Client Side Hardware Interacting Controls

Sep 19, 2010

This is not a programming question per se, but rather an attempt to find the adequate technology to use for my objective. My mandate is to build an ASP.NET Web Application. However, on certain pages, some client-side information needs to be fetched by interacting with hardware on the client's computer, for example a barcode reader or an RFID tag reader. My first reflex was to think "ActiveX" controls with, perhaps, some AJAX coding to fetch the required values from said control. However, I am not sure if I am up to date with the latest tech trends. The solution I'm looking for will let me design a user control that plugs into my ASP.NET Web Application, lets me interact with client-side hardware, and can be automatically downloaded from the Web Application itself (I can't predict which computers will access my Web Application). Which technology(ies) should I go for?

View 2 Replies

Programmatically Interact With IIS So That It Changes Where Virtual Directory For A Test System Points To Based Result Of Build?

Mar 29, 2011

I have a C# program used to build and deploy a suite of websites.

I would like to programatically interact with IIS so that it changes where the virtual directory for a test system points to based the result of the build.

View 4 Replies

Forms Data Controls :: Using A Repeater To Build A Website's Site Map Page By Binding To The Web.sitemap File?

Jun 3, 2010

I've been using a repeater to build a website's site map page by binding to the web.sitemap file. For example, to display 2 levels of links:

[Code]....

So far, everything works well. However, in some cases, I do not want to display certain pages in the site map. I've added a custom attribute to each node (nodisplay= 'true').How can i check for this attibute, and avoid it from being displayed by in the repeater.

View 3 Replies

Web Forms :: Site Theme Based On Url?

Feb 4, 2010

I have a few sites that use the same application but use details to populate the site content such as title, logo and theme based on the URL. These details are stored in a database.

What is the best way to populate these details. I was thinking this should be done in the Global.asax rather then my page.master

I have a master page that is used for all the sites and had the code called ther but it might be better to do the database calls in Global rather then in the master page?

View 3 Replies







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