C# - An ImageMap For A Navigation Menu Considered Good Practice?

Feb 2, 2010

Should I use an ImageMap to create a navigation menu?

View 1 Replies


Similar Messages:

Web Forms :: How To Work With Navigation Menu And Assign Pages In Navigation Menu In Master Page

Aug 25, 2010

Iam using masterpage and i want to use navigation menu ,but i don't want to use sitemap concept

how to work with navigation menu and assign the pages in navigation menu in master page

View 2 Replies

Web Forms :: Navigation Menu / Login And Add Some Buttons To Navigation Menu

May 19, 2010

I'm developing a Portal to a school

I need to login (ok)

I also need when the login is ok, to add some buttons to navigation menu, taht is created in the Master Page.

Is it possible?, how?

i already handle the page load on the default page.

View 3 Replies

Good Practice When Retrieving SQL Data?

Jan 19, 2011

I'm currently using the fantastic DorkNozzle 'framework' for building a very basic blog in .NET.My first "self-taught" script is as follows, and is for solely retrieving SQL results.

PHP Code:

<%@ Page Language="C#" MasterPageFile="~/Dorknozzle.master" AutoEventWireup="true" Title="Blog" %>
<%@ Import Namespace = "System.Data.SqlClient" %>
<script runat="server">[code]....

I should change to perhaps improve my coding style, without going down the MVC line just yet?

View 17 Replies

Is This Modified C# Singleton Pattern A Good Practice

Feb 9, 2010

I'm developing a blog application shared by non-profit organizations. I want each organization to be able to change their own blog settings. I have taken a singleton pattern (from BlogEngine.net) and modified it. (I understand that it is no longer a singleton pattern.) I have tested this approach and it seems to work fine in a development environment. Is this pattern a good practice? Are there issues, which may arise when this is placed in a production environment?

public class UserBlogSettings
{
private UserBlogSettings()
{
Load();
}
public static UserBlogSettings Instance
{
get
{
string cacheKey = "UserBlogSettings-" + HttpContext.Current.Session["userOrgName"].ToString();
object cacheItem = HttpRuntime.Cache[cacheKey] as UserBlogSettings;
if (cacheItem == null)
{
cacheItem = new UserBlogSettings();
HttpRuntime.Cache.Insert(cacheKey, cacheItem, null, DateTime.Now.AddMinutes(1),
Cache.NoSlidingExpiration);
}
return (UserBlogSettings) cacheItem;
}
}
}

(Portions of code were omitted for brevity.)

View 3 Replies

Good Practice To Avoid Using Session State In MVC?

Mar 7, 2011

It's not explicitly written somewhere but I felt so after reading few blogs on ASP.NET MVC. Just got curious and thought of asking it here.

UPDATE: I'm not asking about memory/storage/RAM concerns on server. For them, there is a solution to store session out of process. I know that. I'm curious that, are there any scenarios where we had to use Session in WebForms but we can avoid it now in MVC taking benefit of the nice structured way offered by MVC?

View 6 Replies

C# - Is It A Good Practice To Implement Logic In Properties

May 27, 2010

we use ASP.NET with C# and based on open source projects/articles I passed through, I found many properties were including a logic but when I did so the team-leader told me it's not good at all to place logic inside properties but to call the logic through methods...

View 6 Replies

Good Practice - Connection String In Web.config?

Jun 30, 2010

Whats the difference, if in my web.config i use. both works with my code. what is right way of diong it? keeping connection string?

[code]...

View 4 Replies

C# - Is It A Good Practice To Write HTML Using A StringBuilder In Codebehind

Mar 25, 2010

I'm interested to hear from other developers their opinion on an approach that I typically take. I have a web application, asp.net 2.0, c#.

What I usually do to write out drop downs, tables, input controls, etc. is in the code behind use StringBuilder and write out something like sb.Append("

I don't find myself using to many .net controls as I typically write out the html in the code behind. When I want to use jQuery or call JavaScript I just put that function call in my sb.Append tag like sb.Append("td...onblur='fnCallJS()'.

I've gotten pretty comfortable with this approach. For data access I use EntitySpaces.

I'm just kind of curious if this sort of approach is horribly wrong, ok depending on the context, good, time to learn 3.0, etc. I'm interested in learning and was just looking for some input.

Edit

After reading the comments here it sounds like I should take a look at MVC. I've not done that yet. The only hesitancy in doing so is that the existing project is just that, existing. There is a lot of code already done the way I explained and it is hard to imagine what would be involved in changing it, advantages of doing so, and just learning what that would take.

The other thing I'm taking away from the comments is that my code behind should really not include much of the sb.Append code, whereas now it is filled with it in numerous functions. To me it is not messy but that is because I know what each function does and can look at it and see, oh that writes out x, y, and z.

It's not uncommon for me to just have a div on the .aspx part and then build up the .innerHtml of that with the StringBuilder in the code behind.

View 7 Replies

Which Pattern Most Closely Matches Scenario Detailed And Is It Good Practice

Mar 6, 2011

I have seen a particular pattern a few times over the last few years. In the UI, each new record (e.g., new customers details) is stored on the form without saving to database. This clearly has been done so not clutter the database or cause unnecessary database hits.

While in the UI state, these objects are identified using a Guid. When these are a saved to the database, their associated Guids are not stored. Instead, they are assigned a database Int as their primary key.

The form can cope with a mixure of retrieved items from the database (using Int) as well as those that have not yet been committed (using Guid).

When inspecting the form (using Firebug) to see which key was used, we found a two part delimited combined key had been used. The first part is a guid (an empty guid if drawn from the database) and the second part is the integer (zero is stored if it is not drawn from the database). As one part of the combined key will always uniquely identify a record, it works rather well.

View 3 Replies

Does Anyone Know A Good Practice To Use When Developing For The System.directory Services Class

Jan 31, 2011

I'm trying to create a data access later using System.DirectoryServices. I'd like to use the MVC 2 framework and have all my views be mostly strongly-typed. Does anyone know any good way to this?

For example I started creating a Group Entity:

public class Group
{
public string DistinguishedName { get; set; }
public string GroupName { get; set; }
}

And an abstract interface:

public interface IGroupRepository
{
List<Group> Groups { get; }
}

I am confused about developing the GroupRepository using the system.directory services. Connecting to a SQL database is easy there are examples everywhere but I have no been able to find any using the System.directory sevices in conjunction with a class using MVC. Has anyone tried to do something like this?

View 1 Replies

C# - Good Practice To Perform Direct Database Access In The Code-behind Of Webpage?

Jun 7, 2010

I am an experienced developer but I am new to web application development. Now I am in charge of developing a new web application and I could really use some input from experienced web developers out there.

I'd like to understand exactly what experienced web developers do in the code-behind pages. At first I thought it was best to have a rule that all the database access and business logic should be performed in classes external to the code-behind pages. My thought was that only logic necessary for the web form would be performed in the code-behind. I still think that all the business logic should be performed in other classes but I'm beginning to think it would be alright if the code-behind had access to the database to query it directly rather than having to call other classes to receive a dataset or collection back.

View 2 Replies

VS 2008 - Menu Navigation Control - Spacing Between Menu Items

Jul 10, 2010

I added a menu avigation control in my page and i did this:

<div style="background-color: Maroon">
<asp:Menu ID="Menu1" runat="server" Orientation="Horizontal" ForeColor="Black" Font-Bold="true"
BackColor="Chocolate">
<Items>
<asp:MenuItem Text="Home"></asp:MenuItem>
<asp:MenuItem Text="About Us"></asp:MenuItem>
<asp:MenuItem Text="Services"></asp:MenuItem>
<asp:MenuItem Text="Careers"></asp:MenuItem>
<asp:MenuItem Text="Contact Us"></asp:MenuItem>
</Items>
</asp:Menu>
</div>

but i cant give proper spacing between the menu items right now it is appearing like this: how to give proper spacing between the menu items them?

View 14 Replies

Web Forms :: Menu And Menu Items For Navigation?

Jun 16, 2010

I'm using asp.net and css to style a master page with navigation at the top. I was hoping to add the login status control in as a menu item but it is not allowed. Can someone point me in the right direction? When I post my code on this forum do I have to include tags?

View 4 Replies

MVC :: Navigation Menu / How To Built <UL><LI> Menu From The Db

Aug 19, 2010

I've buit a menu functionallity in my MVC app where you can add/remove and modify navigation items:

this is what it looks like in the database (the key thing to notice here is URL field where i'm storing all Area/Controller/Action/Param values.

Now, on the front end I would like to built <UL><LI> menu from the db.

How would I know what page I'm on so that I can add class "current" to <li>. If for example I'm in "http://localhost/Admin/Admins/Dashboard" how would i know it applies to /Admin/Dashboard AND /Admin/Dashboard/Index?

-another thing. how would i handle params. For example when I'm on page /Admins/ContactUs/Edit/32 - how would i match this to /Admin/ContactUs/Edit/ ?

View 1 Replies

Navigation Menu Like Thegatesnotes.com?

Jan 27, 2010

Anyone know how to create a menu like the thegatesnotes.com ? Can we custamize the treeview control like that?

View 1 Replies

Navigation Menu Not Aligned

Jan 11, 2011

I am putting a navigation menu with in a div but the menu in aligned correctly. I want it to aling to top but it is being placed at the bottom.

Here is the script:

<%@ Master Language="VB" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
End Sub
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<title>Super Dream Mattress Co. </title>
<meta name="description" content="Super Dream Mattress Co. - Scorland only Memory Foam Mattress Manufacturer. We Manufacture Foam Toppers, Double Mattresses, Single Mattresses and Kingsize Mattresses. Free next day delivery on items, contact us online or call
0141 810 4333" />
<meta name="keywords" content="memory foam mattresses, memory foam toppers, memory foam double mattress, memory mattress, memory foam mattresses, Super Dream Mattress Co, Superdreammattressco" />
<script type="text/javascript" src="script.js"></script>
<link rel="stylesheet" href="style.css" type="text/css" media="screen" />
<!--[if IE 6]><link rel="stylesheet" href="style.ie6.css" type="text/css" media="screen" /><![endif]-->
<!--[if IE 7]><link rel="stylesheet" href="style.ie7.css" type="text/css" media="screen" /><![endif]-->
<style type="text/css">
.newStyle1
{
font-family: Arial, Helvetica, sans-serif;
font-size: medium;
}
</style>
</head>
<body>
<div id="art-page-background-simple-gradient">
</div>
<form id="form1" runat="server">
<div id="art-main">
<div class="art-Sheet">
<div class="art-Sheet-tl">
</div>
<div class="art-Sheet-tr">
</div>
<div class="art-Sheet-bl">
</div>
<div class="art-Sheet-br">
</div>
<div class="art-Sheet-tc">
</div>
<div class="art-Sheet-bc">
</div>
<div class="art-Sheet-cl">
</div>
<div class="art-Sheet-cr">
</div>
<div class="art-Sheet-cc">
</div>
<div class="art-Sheet-body">
<div class="art-Header">
<div class="art-Header-png">
</div>
<div class="art-Header-jpeg">
</div>
<div class="art-Logo">
<h1 id="name-text" class="art-Logo-name">
<a href="~/Default.aspx">
Super Dream Mattress Co.</a></h1>
<div id="slogan-text" class="art-Logo-text">
Dreams in Comfort</div>
</div>
</div>
<div class="art-contentLayout">
<div class="art-sidebar1">
<div class="art-Block">
<div class="art-Block-body">
<div class="art-BlockHeader">
<div class="l">
</div>
<div class="r">
</div>
<div class="art-header-tag-icon">
<div class="t" >
Menu</div>
</div>
</div>
<div class="art-BlockContent"
<div class="art-BlockContent-body">
<div class="cleared" >
<asp:Menu ID="Menu1" runat="server" DataSourceID="SiteMapDataSource1"
StaticDisplayLevels="3" valign="top">
<StaticMenuItemStyle VerticalPadding="0px" />
</asp:Menu>
<asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" />
</div>
</div>
</div>
<div class="cleared">
</div>
</div>
</div>
<div class="art-Block">
<div class="art-Block-body">
<div class="art-BlockHeader">
<div class="l">
</div>
<div class="r">
</div>
<div class="art-he
<div class="t">
Highlights</div>
</div>
</div>
<div class="art-BlockContent">
<div class="art-BlockContent-body">
<div>
<p>
Super Dream Mattress Co. become members of the National Bed Federation.</p>
<p>
<img alt="Super Dream Mattress Co. become member of the NBF" class="style2"
src="images/nbf_logo.gif" align="middle"
style="z-index: auto" /></p>
<p>
<br />
</p>
</div>
</div>
</div>
</div>
</div>
<div class="art-Block">
<div class="art-Block-body">
<div class="art-BlockHeader">
<div class="l">
</div>
<div class="r">
</div>
<div class="art-header-tag-icon">
<div class="t">
Contact Info</div>
</div>
</div
<div class="art-BlockContent">
<div class="art-BlockContent-body">
<div>
<img alt="an image"
src="images/contact.jpg"
style="margin: 0pt auto; display: block; width: 95%;" />
<br />
<b>SuperDream Mattress Co.</b><br />
Unit 3a Pegasus Business Park<br />
Hillington, Glasgow<br />
Scotland, G52 4TY<br />
Email: <a href="mailto:sales@kayfoam.co.uk">sales@kayfoam.co.uk</a><br />
<br />
Phone: 0141 810 4333<br />
Fax: 0141 810 1423
</div>
<div class="cleared">
</div>
</div>
</div>
<div class="cleared">
</div>
</div>
</div>
</div>
<div class="art-content">
<div class="art-content">
<div class="art-Post-body">
<div class="art-Post-inner">
<asp:ContentPlaceHolder ID="ContentPlaceHolder2" runat="server">
</asp:ContentPlaceHolder>
</div>
</div>
</div>
</div>
</div>
<div class="cleared"
</div>
<div class="art-Footer">
<div class="art-Footer-inner">
<a class="art-rss-tag-icon"
title="RSS"></a
<div class="art-Footer-text">
<p>
Contact Us</a> |
Terms of Use</a
Trademarks</a> |
Privacy Statement</a><br />
Copyright © 2011 ---. All Rights Reserved.</p>
</div>
</div>
<div class="art-Footer-background">
</div>
</div>
<div class="cleared
</div>
</div>
</div>
<div class="cleared">
</div>
<p class="art-page-footer">
Kayfoam</p>
</div>
<div>
<asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
</div>
</form>
</body>
</html>

View 2 Replies

Web Forms :: Alignment In Navigation Menu

Jan 16, 2010

[Code]....

I want to be able to make the first line blank, in this case "about us" and still keep the same dyamtic alignment on my nav menu. Right now, if i take the "about us" title text out, it messy up my dyamtic or on hover nav menu. What would be best is i can replace those letters with spaces but it won't work with just blanks. Any idea on how i would not display the "about us" but keep everything as is?

View 5 Replies

Web Forms :: How To Make Navigation Menu

Jul 11, 2010

I'd like to make navigation menu like one in [url=http://www.eveonline.com/]here[/url]. I thought about using TreeView, but I couldn't make "collapse" indicators to disapear. If I set ShowExpandCollapse property to "false" those indicators disapear, but tree becomes expanded and static. That's not what I want to achieve.

View 2 Replies

Web Forms :: Logout At Navigation Menu

Nov 9, 2013

How can I add a logout link to my navigation menu. I have horizontal dropdown menu.

View 1 Replies

Webpage Menu / Navigation System Recommendation?

Feb 1, 2011

Im a newbie working on my first ASP.NET webpage using Visual Studio 2010. Im looking for a recomandation on a flexible webpage navigation/menu system. I need a dynamic system that uses SQL as backend (so that webmaster can update menus/navigation using a simple CMS) Any good systems out there you would recomend?

View 3 Replies

Web Forms :: 2010 To 2008 Navigation Menu

Sep 23, 2010

played w/ visual web developer 2010 and liked the template that i was given by creating a new project using the "asp.net web application visual basic" However my company is using visual studio 2008 and we are not upgrading anytime soon. So i'm trying to remake that template in visual web developer 2008. I've got 90% of it transfered and working, the styles and master.site and all work, except the menu. It's like the CSS isn't carying over right, the drop downs work on mouse over but I don't have the nice puffy buttons that change background color when i mouse over. I've dug though the css and asp code and can't find anything thats not linking up. Does anyone have any idea how to get this last 10% figured out?

<div class="clear hideSkiplink">
<asp:Menu ID="NavigationMenu" runat="server" CssClass="menu" EnableViewState="false" IncludeStyleBlock="false" Orientation="Horizontal">
<Items>
<asp:MenuItem NavigateUrl="~/Default.aspx" Text="Home"/>
<asp:MenuItem Text="Obituaries" Value="Obituaries">
<asp:MenuItem Text="Recent" Value="Recent"></asp:MenuItem>

View 2 Replies

Web Forms :: Navigation Menu Disappears From Page

Nov 14, 2010

I am having a problem with my menu. My navigation menu gets created with data from different tables in a database. When the page loads after a few minutes the navigation menu disappears from page. Does anyone have had this problem or knows how to fix it?

View 3 Replies

Web Forms :: Navigation In Menu Control Browser IE7?

Feb 28, 2010

I am a student and .net freshers.I have been working on a website using asp.net and has used menu control in it.it has various sections like home,about us ,customer care and i have set navigate url for each menu parts and submenus .but it is not navigating to respective pages while it is opened in browser. I have seen sitemap usage and iE8 compatiblity articles does it needs to be done ...cant it workout just by setting navigate url in property of menu?

View 6 Replies

Menu Navigation Bar With Dropdown Visible To False?

Mar 22, 2011

I have a menu navigation bar with drop down menu in asp.net project.i have done this with jquery.To get into this page i have 5 hyperlinks in previous page. when i click on one of the hyperlink and enter the navigation bar page,i need to make dropdown visible to false. i dont have any idea related to this.

View 1 Replies







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