Thursday, January 26, 2012

Change your fb profile with facebook Timeline

0 comments

Facebook has lunched Timeline in previous year and many of people has already converted their profiles to Facebook Timeline (new look), Today i have also converted my profile with fb Timeline so following are steps you need to look if you would like to convert your profile as well!.


  1. Just login to your facebook account
  2. You will get all details here about Timeline and introduction video
  3. "Get Timline" - Convert your current profile with Timline (still not published)
  4. "Start Tour" - Go through guidlines of Timeline
  5. "Publish Now" - Publish your facebook profile with Timeline

and that's it! enjoy the new look with Timeline , it's really awesome!!

Read More

Saturday, January 21, 2012

A hassle-free tool to schedule events

0 comments
Now days many people organize different events, it should be public event, group event, technical event or anything you need to first decide about time convenience of participants.

so just go to Doodle

Here I have created one event "party at my home" (not in real!) without any registration. see here step by step..

1)Create Poll  
Create your poll and other information like place, email


2)Set Date & Time

Date and time slots, you can add more date and time slots if you want to give more choice to participants.



3)Select type of poll

I have spiked this because i want basic poll.


4)Share link & Administration link

It will provide 2 link on completion as per below

Share link: you have to share your friends to give their choice
http://www.doodle.com/7z3syy2aa74f7r83

Administration link: administer this poll and arrange your event as per participant's convenient date and time

Happy Scheduling!!!!!!!



Let know the other people about your availability

0 comments
If you are professional, employee, business person, students, volunteer (or not started anything yet!) you can inform others about your availability with tungle

I have scheduled my availability for next week
just hit this http://www.tungle.me/arunrana

Very easy steps to create this (Really!! Let's see)

1) Create account

you need to create account here, you can use OpenId also like Google, Facebook etc.

2) Pick URL
you need to pick URL which will allow to display your availability to others as per shown in fig.


3) Complete your profile
You have to complete your profile by others details if you wish!


4) Edit your schedule

you can edit your schedule her using interactive calendar interface (very user friendly) and save it.

that's it! remaining step is share your URLs to others and be busy guy! from today..

Friday, January 20, 2012

use of custom configuration section in web.config

0 comments
Web.config consists of different configuration sections which allow the developer to configure the application. ASP.NET also allows you to create your own custom sections and section group. Today I would like to share here how to create custom section in web.config and access it in code.

In web.config you can define sections and it's key-pair value as per shown in below fig.
web.config

C#

However when putting just key/value type of stuff, there's not much benefit of using custom config sections but useful when there's multilevel hierarchy with more properties, in that case you need to define your Configuration Class also as per described here.

Read More

Saturday, January 14, 2012

Explore Visual studio 2010 - Navigate To option

0 comments
Generally it is very tedious task to search any page or file form solution explorer , open it and switch between them with mouse click.

Although you have shortcut to go at solution explorer ctr+w+S then also you need to look around folder hierarchy.

In visual studio 2010 very useful shortcut to go with specific file by Navigate To option Just hit CTR + < and write about file name or page, it will listed all files relevant to your search keyword as per shown in fig.



and with up down key you go with specific file and just hit enter to open that.

so speed up your visual studio experience !!

Paypal integration in MVC3 and Razor

16 comments
Today i would like to describe here step by step procedure to integrating paypal integration (express checkout) in MVC3 web application using razor view engine.

1)Create new MVC3 internet web application.

2)change Index page under Home section and as per below fig





3) Create paypal model class



4) Create action in home controller to post data to paypal



here we post item information in form so we can retrieve it using parameter as you can see that value when you debug as per below


in that you need to set following parameters in web.config
  • BusinessAccountKey: business account key for seller
  • UseSandbox: weathere to use sanbox or live
  • CancelURL: return to this when user cancel
  • ReturnURL: return after payment
  • NotifyURL: use for IPN to notify
  • CurrencyCode: transcation in which currency 
to use sandbox you need to create account at https://developer.paypal.com/
and in that you can create business account as well as buyers account to testing as per shown in fig



I have added that in web.config as per below



If you new for paypal integration then first go through this introduction here .

5)create view of this action (empty view) and code as per below



6) Now run the site and click pay with paypal , you will be redirecting to paypal as per below


here you can pay with your personal test account and redirect to back as per app-setting URLs

7) To handle redirected request you need to create following controller and respective views with your logic and message.
  • RedirectFromPaypal 
  • CancelFromPaypal 
  • NotifyFromPaypal 

Friday, January 13, 2012

Google science fair 2012 for students aged 13-18

0 comments
Google is looking for the brightest young scientists from around the world
to submit interesting, creative projects that are relevant to the world today.

Google's objective behind this to give platform to students  around the globe to explore their creative idea, to search tomorrow's scientist.

You have to submit your project with small 
YouTube video or
Google presentation
which can be access publicly.

also you need Google account for that. this competition is only for student aged 13-18, so if you can't belongs to that range, inspire students in your family.

Competition closes 1 April 2012 so harry up!

Follow the link



Wednesday, January 11, 2012

Use web.config transfromation in visual studio

0 comments
Generally most of programmers maintain their connection string and other setting of live environment in signal web.config with comment to switch in to live environment and will do manual changes whenever need to change environment.
However Visual studio gives you facility to make this transformation automatically, so today I would like to explore this idea here.


When you create new project in Visual studio 2010, it has separate configuration for debug and release as you can see in following fig.




Read more about this 2 environment at msdn.


You can set specific configuration from toolbar and create new environment as well and add new configuration source under web.config as per shown in below figs.







Let's take an example in web.Release.config write connection string as per shown in below fig.




Transformation actions are specified by using XML attributes which is mapped to the xdt prefix.
In the above example "SetAttributes" transform will change the value of "connectionString" to use "ReleaseSQLServer" only when the "Match" locator finds an attribute "name" that has a value of "MyDB".


Read more about syntax on msdn

Look at video about this here

Monday, January 9, 2012

Asynchronous Remote validation in MVC3 with razor

0 comments
In many website you found that when you registering at that time username validate asynchronously while you filling other details without posting page back and that's look awesome!.
I would like to share same scenario using MVC3, hope you know about MVC before reading further. In MVC you have to handle all validation from model.
Now i came to point , just i have register page where first field is username as per below in index.cshtml under Wizard folder.


<div class="editor-label">
  @Html.LabelFor(model=> model.UserName)
div>

<div class="editor-field">
@Html.EditorFor(model=> model.UserName)
@Html.ValidationMessageFor(model=> model.UserName)
div>


In Model wizard.cs following validation


[Required(ErrorMessage= "Full Name required.")]
[StringLength(20,ErrorMessage = "Username must be under 20 chars.")]
public string UserName { get;set;}


Now just add remote validation as per below In this example, we are going to add remote validation to the username field to check that it is unique.


[Remote("ValidateUsername","Wizard",HttpMethod = "POST",ErrorMessage = "username is not available")]
Remote has three constructors allow you to specify either 
-RouteName, 
-Controller and action or 
-Controller, action and area. 
Here we are passing controller and action and additionally overriding the error message.


Now define action in wizardcontroller.cs as per below


public ActionResult ValidateUsername(string username)
{
return Json(!username.ToLower().Equals("duplicate"),JsonRequestBehavior.DenyGet);
}


here for sake of simplicity i have just validate username with duplicate string and return rue or false based on that , in real scenario database validation logic goes here. 


Now when you test it browser and inspect with firbug then you can able to watch asynchronous post request when you are typing in username textbox or leaving focus from that as per below .

read more about JsonRequestBehavior enumeration
here

if you 
want to pass additional field then change code as per below
[Remote("ValidateUsername","Wizard",HttpMethod = "POST",AdditionalFields="Email",
ErrorMessage = "username is not available")]
public ActionResult ValidateUsername(string username , string email)
{
//put some validation involving username and email here
return Json(!username.ToLower().Equals("duplicate"),JsonRequestBehavior.DenyGet);
}


Related Links

Friday, January 6, 2012

Introduction of Glimpse-Debugging your server within client

0 comments
Open source community developers developing the great tools for debugging and i came across today such a great Nuget Pacakge called glimpse when i was learning MVC3.

what is glimpse? It's says that
"What Firebug is for the client, Glimpse does for the server... in other words, a client side Glimpse into whats going on in your server."
Glimpse is Firebug like client side debugger,implemented in JavaScript on the client side, look in to ASP.NET on server side.

1) Install glimpse with following nuget command


and after that type glimpse.axd to end of URL redirect to glimpse page e.g. http://localhost:49270/glimpse.axd

2) Turn On




click on bottom right corner as per show in below fig.



3) Look in to server within client

I have write following code in controller to look at trace







Read More

Scott Hanselman's blog

http://www.hanselman.com/blog/NuGetPackageOfTheWeek5DebuggingASPNETMVCApplicationsWithGlimpse.aspx

Glimpse official site

http://getglimpse.com/

http://getglimpse.com/Help



Design of nuget package installation command

3 comments
As per my previous blog post understanding of nuget package (http://www.arunrana.net/2011/10/understanding-nuget-package-manager-for.html), it is very useful tool in today .net programming , many developers building their packages and it will make process as much simple that user can install easily with just one command line.

Best example is ELMAH (Error Logging Modules and Handlers)

Today I would like to share with you that if you have already buit your Nuget package and you want to put it in your blog or webite to show commnad using standard design (with black box) as you found in Manage My Packages section on Nuget.org as per below fig.



Just you need to add below style sheet

.nuget-badge code {
background-color: #202020;
border: 4px solid silver;
border-bottom-left-radius: 5px 5px;
border-bottom-right-radius: 5px 5px;
border-top-left-radius: 5px 5px;
border-top-right-radius: 5px 5px;
color: #E2E2E2;
display: block;
font: normal normal normal 1.5em/normal 'andale mono', 'lucida console', monospace;
line-height: 1.5em;
overflow: auto;
padding: 15px;
}

and put html code as per below with your command

 <div class="nuget-badge" >
   <p>
         <code>PM&gt; Install-Package elmah </code>
   </p>
</div>


and it's done.

cheers!

Thursday, January 5, 2012

Look at new look & feel of SQL Azure management portal

0 comments
I came across today with good articles of SQL Azure management portal tips & tricks by R Syam Kumar would like to share here, it is great improvements with management UI by Microsoft however You required silverlight 5 runtime.

It will cover following things

  • Introduction to the new Metro-style UI
  • Administration and Design Workspace
  • Navigation tips and tricks
  • query designer , query monitoring
  • database dependency views
Sql Azure management portal tips and tricks part-1
Sql Azure management portal tips and tricks part-2

Also nice video with overview of this 2 blogs

Monday, January 2, 2012

Testing Nuget Package before Publishing

0 comments
As you know that Nuget.org is not allow you to delete youre package once you have published. just they are giving facility to hidden it from search result as per their policy.


That's why it is essential to test it before publishing your pacakge to nuget. so I would like to go step by step process how you can test your package.


1) Create directory and save packages
C:\\Nuget Package and save your package (.nupkg)


2) Add source path in VS2010
open visual studio go to > tools >  Library Package Manager > Package Manager Setting








3) select package source





and now you can test your package using command as you are doing with
official Nuget packages.


when you will finalize your testing then you can publish at last.
Cheers!





Check How many domains registered by date

0 comments
Internet is growing at tremendous speed and more people purchase web hosting, domain name at daily bases to grow their business , to contribute in web articles , to do online business and many more.

If you are aware of domain name (address of your website) then in your mind there may be one question that how many domain registered today or at particular date how many and which are domains registered ??

you can find that information on following website.

http://daily.domain-name-registered.com/