Vipul Limbachiya Rotating Header Image

Create 3d chart/graphs in asp.net c# or vb – resources

Create 3d chart/graphs in asp.net c# or vb

3d Pie chart

http://www.codeproject.com/KB/web-image/3dpiechart.aspx

Zedgraph - powerful yet complex. Easy for simple graphs with lots of customizable options. I’ve used this in one project.

http://zedgraph.org/wiki/index.php?title=Main_Page

Example of chart I made:

Code : TrafficHourlyReport.aspx.cs – Remove unwanted namespace and code in this class, you’ll able to run this with static values after attaching zedgraph dlls. (ZedGraph.dll and ZedGraph.Web.dll)

Graph library – Easy yet powerful.

http://www.codeproject.com/KB/web-image/GraphLibrary.aspx

Published via http://docs.google.com

Thanks,
Vipul Limbachiya

VN:F [1.9.3_1094]
Rating: 0.0/5 (0 votes cast)
VN:F [1.9.3_1094]
Rating: 0 (from 0 votes)

jQuery plugin to add multiple fields (cloned elements) on-the-fly on webpage

Hi Friends,

Few days back I came across a requirement in one of my projects to add contact field as many time as user wants. To add this at serverside it was not a tough task but why to add load on server and add clumsy code when we can easily add ‘em via javascript.

Introduction:
What’s it : a jQuery plugin to add multiple fields (cloned elements) on-the-fly on a web page with great custom extensions – asp.net, php or any server side language

To use this plugin you’ll first need to download jquery from http://www.jquery.com attach it to your page and attach this plugin script as well.

<script type=”text/javascript” src=”js/jquery-1.3.2.min.js”></script>
<script type=”text/javascript” src=”js/jquery.multiFieldExtender.js”></script>

Now for any field, panel, div, paragraph, image any element on page you want to have a button/link which says “add more” (customizable) and on click of it copy the element and add under current element.

Why?

That seems to be an easy task for jQuery, you may guess “clone” from jQuery does the trick why we need this plugin?

I’ll add here, we have lots of options in this plugin to customize. They are listed below:

  • linkText : Text of “add more” link
  • linkClass : CSS Class of “add more” link
  • enableRemove : Set true/false if want to enable/disable
  • removeLinkText : Text of “remove” link
  • removeLinkClass : CSS Class of “remove” link
  • confirmOnRemove : Set true/false if want to enable/disable
  • confirmationMsgOnRemove : The message to show for confirmation on remove
  • addEventCallback : this event will be called after adding an element
  • removeEventCallback : this event will be called after removing an element
  • maxItemsAllowedToAdd : Count of items max allowed to be added
  • maxItemReachedCallback : this event will be called when max itmes allowed reached

The default options are:

  • linkText: ‘add more’,
  • linkClass: ‘addMoreFields’,
  • enableRemove: true,
  • removeLinkText: ‘remove’,
  • removeLinkClass: ‘removeFields’,
  • confirmOnRemove: true,
  • confirmationMsgOnRemove: ‘Are you sure you wish to remove selected field(s)?’,
  • addEventCallback: null,
  • removeEventCallback: null,
  • maxItemsAllowedToAdd: null,
  • maxItemReachedCallback: null


What javascript code exactly required to enable this plugin?

<script type=”text/javascript”>
$(document).ready(function () {
$(“.addressDetails”).EnableMultiField();
});
</script>

This few lines of code shown above will add this functionality on all elements which have a class “addressDetails”.

Check out demo page for more information.

What will happen at server side and how to get this data?

The plugin modifies IDs and names of all elements it has cloned and adds its count prefixing an underscore with the main element that has copied first.

eg. “txtName” is an input box and was cloned by this plugin, new input will be called as “txtName_1″ automatically.

asp.net/c# code:

Below code will give you an array of all entries made on page including main input element, you can use for any kind of input element not only textbox.


private ArrayList getTimesArray(string textBoxName)
{
ArrayList arrValues = new ArrayList();

for (int i = 0; i < Request.Form.AllKeys.Length; i++)
{
if (Request.Form.Keys[i].ToString().IndexOf(textBoxName) >= 0)
{
arrValues.Add(Request.Form[Request.Form.Keys[i].ToString()]);
}
}
return arrValues;
}

Live demo:

(Click on the links below, will be opened in new browser tab/window)

There are more details on demo page, how to setup and customize to make it fit in your requirements.


Add_More_1


Flickr_Add_More

Download Plugin:

jquery.multiFieldExtender.min.js (Minified) ~ 4Kb

jquery.multiFieldExtender.packed.js (Packed) ~ 3Kb

jquery.multiFieldExtender.js (Uncompressed) ~ 7Kb

Please let me know if any problem or any help required. Provide your feedback in comments or contact me on GMail.

Thanks,

Vipul Limbachiya

VN:F [1.9.3_1094]
Rating: 4.8/5 (4 votes cast)
VN:F [1.9.3_1094]
Rating: +2 (from 2 votes)

How to drop all procedures in MSSQL database?

Hi Friends,

Below listed SQL script will help you to generate an SQL to drop all stored procedures for your selected database.

SELECT ‘Drop procedure ‘ + SCHEMA_NAME(schema_id)+’.'+name AS SQL_TO_DROP_SP FROM sys.procedures

Just run this against database where you want to remove all procedures, the result can be used to run again and to drop all or selected procedures.

Thanks,

Vipul Limbachiya

VN:F [1.9.3_1094]
Rating: 0.0/5 (0 votes cast)
VN:F [1.9.3_1094]
Rating: 0 (from 0 votes)

Complete forum to discuss on joining Indian Defense Services launched

Hi Friends,

After great response on my post sharing my experience of EKT(Engineering knowledge test) to join Indian Air force I decided to make a forum where people of same interest can join and share their experience, guidelines and queries to each other.

I launched Indian Air force specific forum couple of days ago, which is now modified to discuss on any of Indian Defense Services.

You all are most welcome to join and discuss on your interest relevant topics.

You can go to this forum by clicking here:

http://iaf.vipullimbachiya.com/

Your inputs are most welcome!

Thanks,

Vipul Limbachiya

VN:F [1.9.3_1094]
Rating: 0.0/5 (0 votes cast)
VN:F [1.9.3_1094]
Rating: 0 (from 0 votes)

Paradise Flycatcher – White

wpfc

Pic taken at Indroda Nature Park – Gandhinagar last week!

Thanks,
Vipul

VN:F [1.9.3_1094]
Rating: 0.0/5 (0 votes cast)
VN:F [1.9.3_1094]
Rating: 0 (from 0 votes)

Simplest custom tabs using jQuery

Hi Friends,

Javascript tabs are the most usable script when developing websites, I found a script for tabs using jQuery few days back. I’ve modified that script and created new jQuery tab script which helps to setup tabs on your web page with extremely simple way. Its lightweight (hardly 2 kb!) and most useful.

jQuery Custom Tabs Screenshot

You can checkout demo here.

Download from here.

Tell me if any problem!

Thanks,
Vipul

VN:F [1.9.3_1094]
Rating: 0.0/5 (0 votes cast)
VN:F [1.9.3_1094]
Rating: 0 (from 0 votes)
Pages: Prev 1 2 3 4 5 6 7 8 9 Next