.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

best approach to a simple problem.

Posted By:      Posted Date: September 01, 2010    Points: 0   Category :ASP.Net
let me preface this with saying, i dont really know css or javascript or even xml really. i know enough to do what i need to, i dont know best practices, i can just get it done, so im aksing this to make sure the way i plan on doing this is a good way. just need to be pushed in the right direction. so im looking to make a simple webpage (client side only) that allows a user to pick colors for a IDE (think Visual Studio) so what i want to do is show a segment of code that shows something of all color types.. so think of a code segment like this response.write "hello world" there could be 4 different colors in this... the object, response, the period (it has a name, i forget it), the member, write, and a type, string.. so what im thinking is that there is some text on the page and a drop down that lets you pick the type to color, and then the color... so im thinking to use div tags to identify each type <div id=object>response</div><div id=period>.</div> etc etc and then do an on change for the color drop down to update the colors.. so i can do that, but the question is, im wanting to use CSS/XML so that way, if i get a couple of themes, i can then add a theme drop down to show some premade setups... default.xml <options> <object>red</object> <period>black</object>

View Complete Post

More Related Resource Links

simple wfc and ajax problem

Good day,I wrote a very basic hello world wfc/ajax solution.C#public string sayHello(string name)    {        return "Hello " + name;    }JS:function go() {            tempuri.org.IService.sayHello("John", OnSuccess());        }        function OnSuccess(r) {            document.getElementById("result").innerHTML = r;        }All the plumbing is pretty much what all the dev sites say...but I am getting a curious result.If I put a break in OnSuccess and in sayHello functions. The onSuccess is hit before the sayHello - both are hit though so the wfc seems to be working its just that the onSuccess is being called straight away rather than after the return from the server.Help appreciatedKalCODE:<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server">

Simple GUI problem

So I don't know what's going on, but when I try to select a control (a textbox in my case), it only selects the lowest level control.  What I mean, is that if there is a grid, with a second grid inside, with a textbox inside of that grid - I am unable to left click the text box.  When i right click->select, it doesn't even give me the option to select the text box.  The only way I'm able to do it, is through the document outline, which is a pain. Any info will be much appreciated thanks, Phil  

Seemingly simple URL rerouting problem


// ** URL ROUTING **  
private static void RegisterRoutes(System.Web.Routing.RouteCollection routes)  
  routes.MapPageRoute("Subsite", "{SubsiteName}", "~/Content.aspx");  
  //routes.MapPageRoute("About", "About", "~/Content.aspx");  
  //routes.MapPageRoute("Conferences", "Conferences", "~/Content.aspx");  
  //routes.MapPageRoute("PoliticsPortal", "PoliticsPortal", "~/Content.aspx");  
I am trying to register my routes as above, using a single routes.MapPageRoute() statement to cover all locations of the form www.mysite.com/subsiteName; however, I encounter all sorts of bizarre browser errors relating to my use of client-side AJAX.  If instead I use a separate "hard-coded" statement for each route, it all seems to work.

I have noticed that examples for this on the web (e.g. http://msdn.microsoft.com/en-us/library/cc668177.aspx) all seems to have at least two components in the URL path; e.g.,

routes.MapPageRoute("SalesSummaryRoute", "SalesReportSummary/{locale}", "~/sales.aspx");  
It is possible to do what I'm trying to do, isn't it?  Is there something fundamentally wrong with my approach?

Simple CSS alignment problem



Im trying to create a page with css layout instead of tables.

I want to create a div that is 100% long, and contains three buttons (maybe more?). The first button should be placed to the left, the second in the middle, and the third to the right. They shall, of course, be placed on the same horizontal line.

How to do this with css?

Thanks alot :)

Kind regards,


JQuery - Simple Cookie problem


Hi everyone,

The following code does not work as I expect.  If possible, please fix the following code for me.



var shopping_cart_id = $.cookie('ASP_NET_4_WEBSITE_3_ShoppingCartId');
if (shopping_cart_id == "") {  // not sure ????
shopping_cart_id = guid();
//Create (or update) the value of a cookie to expire in 30 days:
$.cookie('ASP_NET_4_WEBSITE_3_ShoppingCartId', shopping_cart_id, { expires: 30 });




simple css problem


All I'm trying to do is display a line in my header with 4 elements like the following:

 Case ID:   130                                                                                             Original Input: xxx

No matter what I try however, the "xxx" part always displays below the "Original Input" instead of to the right of it.

Following is my code; I've spent an inordinate amount of time on this and I'm hoping it's just something stupid I'm missing. I'd greatlly appreciate any suggestions.


<head runat="server">
    <style type="text/css">

Simple Calculation problem



I am doing a very simple calculation that is not giving me the correct calculation and I don't know why. Here is my code:


float abc;
abc = 0;

for (int a = 0; a < 1184; a++)
  abc = (a + 1) / 1184 * 100; // This is percentage of loop completed

But as this loop loops through, the value for abc is zero the entire time. I've tried using different variable types for abc (i.e. int, float, double) but it makes no difference.

When running this code:


for (int a = 0; a < 1184; a++)
  abc = (a + 1) * 100; // This is percentage of loop completed


the values appear as they should: 100, 200, 300, 400, ect


Why when dividing by 1184 the values automatically become zero?

Problem with simple query



I have a problem with a query. I want to check the field confirm_date if it contains a value or null. If it contains a value I want to do an insert statement.

The query looks like so,



case confirm_date
when is not null

Need help on a simple design approach


Hi All,

I have the following problem: I need to draw a cube on a webform, using asp.net 4.0, similar to a rubik's cube in appearance only. The cube needs to be 3 dimensional, and if the user clicks on a certain part of the cube (quadrant) it needs to be able to change color and redirect to another webform - that is all, no solving or rotating of the cube is included. As you know, the rubik's cube has 9 squares/quadrants/ on each side, 3 sides for a 3 D objects making up for 27 squares...

So my question is do you have to go down to basic math and use coordinates to draw each of the 27 quadrants of the cube, change the backcolor and add an onclick event to each one to redirect or is there a more polished solution via webforms or silverlight or other technology out there? Please share if you have had a similar problem.


Creating a Simple Class in C#

The second article in the C# Object-Oriented Programming tutorial describes how classes are created in C# and how behaviour, in the form of publicly visible and private, hidden methods can be added. This demonstrates some of the uses of encapsulation

Problem to group radio button across gridview rows

In general no one can easily group or make a single selection from radio button list inside gridview rows. There are a lot of way to make a single or unique selection from list. Here i want to share how i can address this problem in the most easiest way. Googling the problem most of the cases i saw the grouping in horizontal way. Thats why i tried to group the radio buttons in vertical manner. Let i have a requirement like below:

A Simple and Extensible Radio Button Style GridView

The GridView is one of the significant controls in ASP.NET 2.0 and later versions. No doubt it reduces a lot of work time. However, customizing the GridView control is not an easy task. For example, it's hard to add a radio button column to the GridView. This article demonstrates the reason why a radio button column cannot act as normal and how to create a simple and extensible radio button GridView.

SDLC Approach or Software Development Life Cycle

SDLC process stats from conception to completion of any software project. According to this approach the software development team is responsible for the whole project development life cycle. After doing SRS and requirements analysis; developers follow different models of Software development Life Cycle (SDLC) available, while the most common model is SDLC waterfall model. They divide project in different stages & phases and the output of each stage or phase becomes the input for next stage.

Application Architecture: An N-Tier Approach - Part 1


Free Trial: SQL Backup Pro
Sponsored by Red Gate
Exceptional DBAs make the most of their office hours. That's why they love Red Gate SQL Backup Pro. Its faster, smaller, secure SQL Server backups mean more time spare to accomplish more tasks and professional training. Make time to be an Exceptional DBA. Download it now! »

Free Trial: SQL Toolbelt
Sponsored by Red Gate
The SQL Toolbelt is a set of twelve powerful and intuitive tools that will help you burn through SQL Server chores with astonishing speed and accuracy. Download it now! »

Download: SQL Backup Evaluation Center
Sponsored by Red Gate
Download the T-SQL scripts in the SQL Backup Evaluation Center to compare Red Gate SQL Backup Pro's compressed backups with the size of backups created using native SQL Server. Download it now! »

Autodesk Inventor®
Go Beyond 3D To Digital Prototyping With Autodesk Inventor. Learn How.
Virtualization Solutions
Optimize, Simplify, & Save Today. Learn About Microsoft Solutions.
Microsoft SQL Server® 2008 - Free Trial
Download the Free 180-day Trial of SQL Server® 2008 Enterprise Edition!
Hot Careers in Internet Marketing
Get prepared for your new career with online degrees from Full Sail University!
Microsoft Te

Silverlight Simple Animation

Silverlight has several built in techniques for animating controls. Many of these technologies are particularly useful for creating simple animations meant to decorate a web page with eye catching movement that draws the reader's attention. In this post I will skip over these decorative technologies, and instead show how to create a simple animation using a technique similar to those used in many games.

Regrading Sharpoint 2010 problem and solutions

We can write your question and problem on this blogger.you get ans.use.

This sharpoint 2010 problem solving threads

Hi friend,

you can use this thread to solving problem and solutions.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend