Posts

Showing posts from 2008

AJAX Enabled WCF Services

See the following URLs: Difference Between SOAP & REST: http://www.ajaxonomy.com/2008/xml/web-services-part-1-soap-vs-rest AJAX Enabled WCF Service: http://www.dotnetcurry.com/ShowArticle.aspx?ID=235&AspxAutoDetectCookieSupport=1 REST in WCF - Part I (REST Overview) http://blogs.msdn.com/bags/archive/2008/05/28/rest-in-wcf-part-i-rest-overview.aspx REST in WCF - Part II (AJAX Friendly Services, Creating The Service) http://blogs.msdn.com/bags/archive/2008/05/29/rest-in-wcf-part-ii-ajax-friendly-services-creating-the-service.aspx REST in WCF - Part III (AJAX Friendly Services, Consuming The Service) http://blogs.msdn.com/bags/archive/2008/05/30/rest-in-wcf-part-iii-ajax-friendly-services-consuming-the-service.aspx Good Blogs on AJAX Enabled WCF Services: http://blogs.msdn.com/bags/archive/2008/11/10/rest-in-wcf-part-xi-tunneling-put-through-post.aspx

ASP.NET Delegation

Good Article to understand IIS & ASP.Net Authentication. http://msdn.microsoft.com/en-us/library/aa291350.aspx

Send an Email with attachment to Multiple Recipients using ASP.Net

Get all email address to list from Database. Here I am using LINQ to SQL to get Email Address from Database. DBDataContext DB = new DBDataContext(); string KitName = rdoAffectedKit.SelectedItem.Text.ToString(); var query = from p in DB.KitMembers where p.KitID == (from kit in DB.Kits where kit.KitName == KitName select kit.KitID).First() select p; List _emailList = new List (); foreach (var obj in query) _emailList.Add(obj.MemberEmail); //MemberEmail is the DB filed, which holds the email address SendEmail(_emailList); //Send Email is the method, which sends email to all recipients protected void SendEmail(List _Recipients) { MailMessage message = new MailMessage(); //Add All Rec...

Copy Files to Remote Location using ASP.Net

The following code transfers files to target Location: string path = @"\\10.100.50.51\Personal\Venu Pavuluri\Texta.xls"; //Source File resides on Server Directory string source = Server.MapPath("Test.xls"); File.Copy(source, path); Response.Write("Trnsfered Successfully!!"); Render Excel File to Browser: protected void TranferXlsFile() { string filename = "Test.xls"; if (filename != "") { string path = Server.MapPath(filename); FileInfo file = new FileInfo(path); if (file.Exists) { Response.Clear(); Response.AddHeader("Content-Disposition", "attachment; filename=" + file.Name); Response.AddHeader("Content-Length", file.Length.ToString()); Response.ContentType = ...

Access Datasource Select Arguments and DataViews

The following example shows how to pass arguments to AcccessDataSource/Sql Datasource Select Method. DataView dataView = new DataView(); AccessDataSource2.SelectParameters[0].DefaultValue = "23233"; dataView = (DataView)AccessDataSource1.Select(DataSourceSelectArguments.Empty); //Iterate Dataview foreach (DataRowView p in dataView) { ID = Convert.ToInt32(p[0]); Parent = Convert.ToString(p[1]); Child = Convert.ToString(p[2]); Status = Convert.ToString(p[3]); ParentRev = Convert.ToString(p[4]); BubbleNo = Convert.ToString(p[5]); }

SVN (Sub Version Control)

The Follwing link has One Click Installer File for SVN. http://svn1clicksetup.tigris.org/ (or) You can install manually using the following link: http://blog.excastle.com/2005/05/31/mere-moments-guide-to-installing-a-subversion-server-on-windows/ (or) http://blogs.vertigosoftware.com/teamsystem/archive/2006/01/16/Setting_up_a_Subversion_Server_under_Windows.aspx Thank You, Venu

UML Basics

Good Tutorial from IBM Website: http://www.ibm.com/developerworks/rational/library/content/RationalEdge/sep04/bell/ Another URL: http://dn.codegear.com/article/31863

C# Interview Questions!!

class ObjectA { private int val; public ObjectA(int i) { val = i; } } struct ObjectB { private int val; public ObjectB(int i) { val = i; } } static void Main(string[] args) { ObjectA obj1 = new ObjectA(10); ObjectA obj2 = new ObjectA(10); ObjectB str1 = new ObjectB(10); ObjectB str2 = new ObjectB(10); Console.WriteLine(obj1.Equals(obj2)); Console.WriteLine(str1.Equals(str2)); Console.ReadLine(); } } OutPut: False True

WCF/WF Videos with Good Explanation!!

I like these basic WCF Videos!! href="http://social.msdn.microsoft.com/content/en-us/msft/netframework/wcf/Screencasts Lot of WebCasts from Microsoft: http://social.msdn.microsoft.com/content/en-us/msft/netframework/wcf/webcasts Workflow Basic Videos: http://www.pluralsight.com/community/blogs/tags/Screencasts/default.aspx You can see more videos on Microsoft Technologies: http://channel9.msdn.com/#Page=2 Basic WCF Application Multiple EndPoint Configuration: http://www.keithelder.net/blog/archive/2008/01/17/Exposing-a-WCF-Service-With-Multiple-Bindings-and-Endpoints.aspx Message Inspector article: http://keithelder.net/blog/archive/2008/01/15/How-to-Get-Around-WCFs-Lack-of-a-Preview-Web.aspx Workflow Tutorial on MSDN: http://msdn.microsoft.com/en-us/library/dd692925.aspx Workflow Simulator on CodePlex: http://code.msdn.microsoft.com/workflowsimulator/Release/ProjectReleases.aspx?ReleaseId=1903 WCF FAQs from Siva Prasad: http://www.c-sharpcorner.c...

IIS 7.0 Configuration

http://msdn.microsoft.com/en-us/library/bb675150.aspx

Expand TOLAPGrid Items on call back (Radar-soft MSAS Cube)

Image
URL: http://radar-soft.com/products/radaraspnet_MSAS.aspx Today I found some interesting event for TOLAP Grid. I had requirement like When user clicks on Parent item, I need to expand all available child items for that parent item. In above TOLAPGrid I have Three Rows, BusinessType Description, Region Name, NDC Number. When Page is loading I need to show all available Business Types and associated Regions & NDC Numbers with collapsed mode. By Deafault TOLAPGrid is providing a functionality as when you click on Parent, its showing immediate child item. But some times the requirement would be when you click on parent Item we need to show all available childs for that selected parent. Practically it seems I need to do write some logic on onCallback event. Because when you click on Parent's item Page is not postbacking, its just callback is happening. But unfortunately I am not able to find any event data in this call. But we have another event as OnGridEv...

LINQ 101 Samples

Good URL for LINQ 101 Examples: Click Me

Returns List of Customers from Northwind DB, and Displays Customer uisng LINQ

using System; using System.Collections.Generic; using System.Data; using System.Linq; using System.Data.SqlClient; namespace ConsoleApplication2 { class Customer { public string CustomerId { get ; set ; } public string CompanyName { get ; set ; } public string ContactName { get ; set ; } public string Address { get ; set ; } public string City { get ; set ; } public string Country { get ; set ; } public static List Customer > getCustomers() { using ( SqlConnection objcon = new SqlConnection ( "Data source=(local);Initial Catalog=northwind;user id=sa;password=sa" )) { SqlCommand objcmd = new SqlCommand ( "Select CustomerId, CompanyName, ContactName, Address, City, Country from Customers" , objcon); SqlDataAdapter objAda = new SqlDataAdapter (objcmd); ...

LINQ Query Syntax

Define Two Classes as Person & Alternate Person class person { public string FirstName { get ; set ;} public string LastName { get ; set ; } public int Age { get ; set ;} } class alternateperson { public string FullName { get ; set ; } public int Age { get ; set ; } } class Program { static void Main( string [] args) { List person > people = new List person > { new person {FirstName = "Venu" , LastName = "Pavuluri" , Age = 28}, new person {FirstName = "Babu" , LastName = "Pav" , Age = 30}, new person {FirstName = "Victor" , LastName = "Serbin" , Age = 35} }; IEnumerable alternateperson > results = from p in people select new alternateperson {FullName = p.FirstName + " " + p.LastName, Age = p.Age}; /*people.Select(p =>...