Solution to Visual Studio ASP Dot net 2008 Ver 3.5 Design view rendering issue

A few days back, i had been suffering from an issue that when i clicked on any .aspx file in Dot net framework that did not get appear while the page seemed to be doing nothing except page halt and you had to have stop that and close that page. I browsed the web and tried to find it on google but all in vain. All the solution posted on different forums very just the solution but actually was doing nothing and were not addressing the real issue. By fortune, i saw a URL by changing my search keywords, all the other links were just rubbish but this appealed me. I open that and tried the solution written in that. Wow, great, it worked.

Then i decided to share that knowledge with Community.

Solution to Problem:

Check your installed programs (Go to Control Panel – Add/Remove Windows Components) and verify that whether the “Microsoft Visual Studio Web Authoring Component” and “Microsoft Web Designer tools” are installed on your computer. If you see those are not there, do the following:

Steps:

1. Insert the DVD you have to yours DVD player.

2. Go to this location \WCU\WebDesignerCore\

3. You will see an .exe with the following name:

“WebDesignerCore.exe”

4. Click on this exe and run it.

NOTE: This exe doesn’t have a User Interface to guide you, so you will have to watch the Task Manager to know when this exe completes its installation.

References:

1. http://blogs.iis.net/rakkimk/archive/2009/03/09/problems-with-rendering-the-quot-design-quot-view-for-a-simple-asp-net-website-from-visual-studio-2008.aspx?CommentPosted=true#commentmessage
2. http://forums.asp.net/t/1167590.aspx

Thanks

Syed Murtaza Hussain Kazmi
PHP and Dotnet 1.1 Website and Software Engineer
Efficiency in code is good but that must be reasonable.

JQuery Multi-Select Plug-in

About Jquery Multi-Select Plug-in:

This plug-in is aim at providing a custom multi-select box with custom CSS. It has been tested all of the major browsers: IE-7 & 8, Fire Fox 3.5.x and 3.6, Safari 3.0.x, Google Chorme.

Requirements

It requires Jquery’s version 1.3.2 or later and in the case you want to use the custom scroll bar, it requires JScroll Pane. You can download JQuery from here

How to install:

1. Keep the required files to your desired folder

2. Include the files to your web-page.

3. Set the parameters which you want to change.

4. For using JScroll pane, set the ‘jScrollPane’ parameter like this

jScrollPane : ‘$(“.table_scroll”).jScrollPane({scrollbarWidth: 6, scrollbarMargin:0})’

Note the quotes around the statement. You can change the JScroll pane setting according to your need.

5. To initialize:

$(function(){

$(‘#mulit’).multiselect({selContainerID : ‘selboxID’ });

});

Give the selector to select the multi-select box and call to the “multiselect” plug-in. Set the parameter and give the id of the container where the selected values would be shown.

That’s it.

Version 1.1.0 Release Date March 12, 2010

A new version of JQuery Multi-Select has been launched. In this release some issues related to the Selected values box have been fixed.

If is2ShowSelected is set to true and selContainerID is not provided, it was throwing error on IE-7 and Google Chrome. So this issue has been fixed.

Download Sample Code and Plug-in Version 1.1.0 here

Download Sample Code and Plug-in here

Thanks

Syed Murtaza Hussain Kazmi
PHP and Dotnet 1.1 Website and Software Engineer
Efficiency in code is good but that must be reasonable.

Causes of delay in achieving the milestones of the projects taken from Freelance websites

After having worked on different freelance websites and in different companies; I found some issues which become hurdle in accomplishing the targets of any project:

1: Clients which come on freelance websites do not disclose the complete information about their businesses in the initial requirement phases even someone tried his/her level best to elicit the requirements from them.

2: Clients deliberately or in-deliberately hide the information which becomes on later stages a menace in attaining the milestones.

3: Immature processes of the workers or companies who work on freelance websites also become the cause of delay in delivery of projects on time.

4: Project management issues and Quality assurance team’s overlooking about errors and bugs in the program, is also another reason of failure.

5: Absence of HCI and lack of ergonomics rules make it difficult for a developer to focus on his/her work and in return delay occurs.

6: Very high demands and expectations from the developers and a pressure of unreal deadlines put a huge pressure on developers which in turn appears as an obstacle in hitting targets.

Human anomalies in doing work and other language related factors must be discussed according to the Software engineering rules and practices before going to start the project.

Real deadlines and mature processes must be implemented in the software houses or in the work place of freelancers.

Thanks

Syed Murtaza Hussain Kazmi
PHP and Dotnet 1.1 Website and Software Engineer
Efficiency in code is good but that must be reasonable.

Discrimination of International Community for Pakistan

Now a days, when each and every country is coming closer to one and other using new technologies and mediums, we are seeing that Pakistan is being neglected by most of the international courtiers in many area of the fields especially in the field of IT. Some of the points are listed below:

1: Most of the internet websites, related to travel, don’t include Pakistan as a destination to be visited.

2: Some international payment merchants do not provide services in Pakistan. An example is: Paypal. Many times workers who are providing services in Pakistan have to interact with such clients who tell that they will send payments via paypal, and it becomes a headache for the service providers to receive payments of their provided services.

3: Urdu which is the language of 6th largest population of the world was being ignored by many international websites including yahoo and hotmail for many years. Now yahoo and hotmail have started some services in Urdu, but still many sites do not contain Urdu in their language boxes. Now, as a 6th largest populous nation in the world, Urdu must be at least on every site which audience and services are not geographically bounded to one country.

4: It is also very strange that on some freelance websites where a large number of Pakistani people are providing services better than other countries, a prejudiced attitude can been seen when these websites write about the emerging and progressing countries, they include India, Romania etc but Pakistan is ignored. While the reality on the ground is, Pakistani service providers are more capable and intelligent and not lesser than any others in their fields. It seems a blatant effort to overlook the services of industrious Pakistani people. Pakistan must be incorporated in the list while tempting clients to select service providers from progressing countries.

The reason which might be behind this ignorance is, current situation prevailing in northern parts of the Pakistan, and one can say that one can not include Pakistan to their travel sites because Pakistan is not a secure country. But if someone has mind on his head, then he can see that that situation has been for few years, before that Pakistan was always a safe place and still it is. So, why was Pakistan ignored at that time? Tourists may come to Pakistan especially Lahore, where they can see many ancient buildings and can find many things which are worthwhile to see. They can go to Kashmir; they can come to see the beauty of vast magnificent deserts, Thal and Cholistan.

Besides the current situation, Pakistani economy is still progressing, Pakistani people are alive and providing services, So Pakistan must be treated in a good manner by the international community.

Thanks

Syed Murtaza Hussain Kazmi
PHP and Dotnet 1.1 Website and Software Engineer
Efficiency in code is good but that must be reasonable.

Problem with URL rewriting using .htaccess based Articles

Problem with URL rewriting using .htaccess based Articles.

This small writing is intended only for the beginners. It is not for the coders who have know-how of .htaccess and are experts or advanced programmers.

Url rewriting using .htaccess is very common now-a-days for the programmers who work especially in PHP on linux or unix based Operating systems with Apache as a web server.

.htaccess is a Global Configuration file in Apache. It is not only used to make redirection but it is also used for many other tasks like Stop displaying the directories of the site if there is no Index or start up page, changing the start up page to something else etc. I am not going into detail of it as you can find much about on internet.

Visit Apache rewrite guide for this purpose if you are interested in knowing further about the rewriting.

The only purpose for this small article was to address the issue with the articles for url rewriting while they are written and published.

They mention in detail about what the rewriting URLs is. They gave examples how to use that but they don’t mention about to change URLs in the code. Coders must write and make URLs according to SEO friendly format and then define a rule for them in .htaccess.

They just mention this is URL and see how it will be redirected.

Example:

Rewriting product.php?id=12 to product/ipod-nano/12.html

RewriteEngine on
RewriteRule ^product/([a-zA-Z0-9_-]+)/([0-9]+)\.html$ product.php?id=$2

The author has mentioned about the url and showed that how the url will be redirected seamlessly. Definitely it will come from the Browsers address bar. But he has not mentioned that this kind of URLs will be made in their programming coding.

Why it is essential, because for the beginners it becomes difficult to understand. So whenever such articles must be written, they must start from making the ground.

Conclusion

A coder must think how the urls will look like before making rules, then he must format the links generated from his code, for instance, make a link for editing the profile of a user according to what he has planned.

Example: http://www.domain.com/profile/Murtaza-2/

Or

http://www.domain.com/profile/Murtaza/2/

It must be generated through the code.

Then he can write a rule in .htaccess like this.

RewriteEngine on

RewriteRule ^profile/([a-zA-Z]+)-([0-9]+)/$ acp/users/options/profile.php?name=$1&idPk=$2

This “acp/users/options/profile.php” is the directory structure where the profile.php is present. Use your own path.

One more thing to be noticeable that when you write a SEO friendly URL which has some query string, You must enclose your query string portion with Parenthesis ‘()’ without single quote. Because it tells the rule that now the sub pattern is going to be started. And it assigns the value to the right hand side’s variables defined as $1, $2 so on.

e.g, in the above rule this part ([a-zA-Z]+) tells the Rule to assign whatsoever is coming at let to right hand side’s $1 and this ([0-9]+)/$ to $2. Note down the parenthesis.

Thanks

Syed Murtaza Hussain Kazmi
PHP and Dotnet 1.1 Website and Software Engineer
Efficiency in code is good but that must be reasonable.

Recommended Font Size for the content’s text of your website Now-a-days

Recommended Font Size for the content’s text of your website Now-a-days

It has been seen that now a days many users use high resolutions because as technology is advancing large resolutions are coming into market.
Before it, most of the users used small resolutions and also small font sizes were in practice. The size which were used was between 10px to 12px.
But now the resolutions are high, it is difficult to see such small font on them. So it is suggested to use the large font sizes.
One can use the font size 12px(min) to 16px. It is also a good habit to define the font sizes in ‘em’ unit. Default em is 16px. Mostly every popular browser’s default font has been set to 16px as every one knows about that.

Here is a very good article which mentions about this topic in detail. So read and do happy coding.
http://informationarchitects.jp/100e2r/

Thanks

Syed Murtaza Hussain Kazmi
PHP and Dotnet 1.1 Website and Software Engineer
Efficiency in code is good but that must be reasonable.

Store And Retrieve data to Mysql db which has many to many relation without creating new third table and keeping intact the normalization

Store and retrieve data which has ‘many-to-many’ relationships with each other without creating a third table

This article is intended for website and software developers who have some knowledge about programming and Databases.

During development in any computer programming language, we usually come across situations where we have to store data taken from different Medias like web forms, CSV files, RSS Feeds etc.

There are also different ways to store the data, like storing data to an XML file, storing data to a CSV file and/or storing data to any database.

Many times software and website developers face a situation in which data has ‘many to many’ relationship with each other. And for this purpose, they make an extra SQL data table in any Database which they use. This is done just to keep the database normalized.

To make life easy, let’s take a simple example and see something about normalization step before moving to the actual topic of this article. I am explaining it here just for the developers who have less knowledge about database and development and are at beginning level and also for making the ground for my solution.

Suppose you are working on a project which is related to any restaurant website. A restaurant website mostly has Menus, Recipes/dishes etc. If you explore further, you will see that the Menus can have many recipes/dishes whereas a dish can be served in different menus; Here Menus are Breakfast, Lunch, Dinner, and Supper etc. Dishes can be Bread, Juices etc.

So you can serve bread in Breakfast, You can serve in Dinner etc. And a menu can have many type of dishes for instance, bread, Fried chicken, Berger etc.

In the above example, you can see that there is a ‘many to many’ relationship between dishes and menus. In order to store data and information for dishes and menus, you will definitely make a data table for Menus, a data table for Dishes. Now if you try and save the data, you will realize that there is repetition of fields in Dishes table.

The Problem

Data is not normalized.

See the below screen shots below for two different tables tblmenu and tbldishes created in MYSQL Database. Please note that these tables are just for explanatory purposes and do not contain all the necessary data fields.

tblmenu

tbldishes

Suppose there are Two Menu items in tblmenu and some dishes in tbldishes tables respectively.

Screen shots of both tables with values are given below:

You can see that ‘Bread’ is served not only in ‘Breakfast’ but also in ‘Dinner’ and it is being repeated. Here is the solution:

The solution

The solution to this problem is to create a new third intermediate table as most of the developers do.

I am not going to create any new third intermediate table. Instead I am moving towards another solution which will suggest how to solve the above problem without creating a new table and keeping intact the normalization.

New solution

Creating a new table will solve the issue of normalization without any problem. But when I used to do that, I always had to know which third table was related to which other two tables in a large database. Also while coding, I would have to store data to that third table and then at query time, I had to make such a query which could fetch the required data from the second table or first table depending upon the third table. It was extra overhead and work which I had to do.

Here is an idea on how this problem can be resolved with just a simple SQL query.

The Idea

I will move forward by again taking the example of restaurant which we are dealing with at the moment. Suppose you have a web page where you have to display some dishes, and you have selected a dish say Bread and you have added it to or attached it with a (or many) Menu like Breakfast or/and Dinner.

Now you need to store that to the db so that it might be available to the user not only for Breakfast but also for dinner.

Do Not go and create a new table in order to store the selected Dish and Menu’s id.

To do so, just make a simple change in tbldishes by changing the type of Menu id foreign key field to Varchar instead of int.

Now you just need to store or insert the selected menus id(s) separated by Commas into that field. e.g, 1, 3

It means Menu # 1 and Menu # 3 have been selected.

Using this technique, there is no need of making the third table or calculating Binary value of the Ids and then summing the Ids up in order to store to the Db menu foreign key Field. You can see the data in the table is normalized.

Also, there is no need to count Total # of Menus in order to calculate 2 ^ n-1 formula for making # of bits and then doing the bit shifting operations on MySQL side in query.

The total cost which will come on this action that is concatenating the Menu ids is just constant and minimum, which makes this solution fast and efficient.

Ok this was the answer of how to store the data.

Now the concern is how to retrieve a Recipe/Dish which is present in different Menus.

That is so simple, easy and efficient using the method I am going to tell you now. No need to be worried about shifting correct number of bits and performing bit wise operations etc or making complex SQL queries for retrieving data.

IF YOU WANT TO CHECK ALL THE RECIPES/DISHES WHICH ARE AVAILABLE IN BREAKFAST AND HAD ID EQUAL TO ONE (1) IN DB TABLE, JUST DO THIS

SELECT dish_Name FROM tbldishes WHERE dish_MenuIdFk REGEXP ’1′

OR

SELECT dish_Name FROM tbldishes WHERE dish_MenuIdFk REGEXP ‘[1]‘

Both will work. You can confirm it by using an example to see the result yourself. No need to manipulate bits or making complex queries.

Again, if you want all the recipes in menu 1 or 4, do the following:

SELECT dish_Name FROM tbldishes WHERE dish_MenuIdFk REGEXP ‘[1 | 4]‘

And if you want 1 and 4, do like this.

SELECT dish_Name FROM tbldishes WHERE dish_MenuIdFk REGEXP ‘[1]‘ AND dish_MenuIdFk REGEXP ‘[4]‘

So will it work for digits (ids) greater than 9?

No, it will cause some repetition.

So what is the solution?

Let’s make some modification to improve it. Store the values from your programming code separated by ‘!’ or any other character which has no Special meaning in REGEXP. ‘!’ this will work as a boundary of the number or Menu id.

I am using ‘!’, so store the values like this

!1!!333!!4! So on

And retrieve as

SELECT *

FROM tbldishes

WHERE dish_MenuIdFk

REGEXP ‘!1!’

OR dish_MenuIdFk

REGEXP ‘!33!’

LIMIT 0, 30

It will work up to any number of digits within a number.

Conclusion:

In my example, only the operation of concatenation of the Ids is being performed before storing them to the DB. In the routine way in which we make a third table, you need to use some loop in order to store multiple ids within the table. This will definitely take much time than just performing a simple concatenation operation.

One can also enhance and optimize the query by indexing the columns which one think will be used for search filters. In my example you can put the “Index” on “dish_MenuIdFk”.

I would appreciate the addition or subtraction and any comment on it in order to make it better.

Note: The command which has been used here in the solution with in sql query is ‘REGEXP’. This is a MYSQL command. You will have to see the alternative command in your database manual if you are not using the MYSQL database.

Thanks

Syed Murtaza Hussain Kazmi
PHP and Dotnet 1.1 Website and Software Engineer
Efficiency in code is good but that must be reasonable.

Solution Summit Mania

I welcome all of you on Solution Summit Blog. Kindly feel free to post about Solution Summit. Leave your comments and suggestions in order to make this site and our services the Best. We will welcome all of your suggestions and we shall try to make the adjustments and make better our services if required and essential in the light of your opinions.

Please click on the above “Solution Summit Mania” link for leaving the feedback.