"If at first you don't succeed; call it version 1.0" :-Unknown

Pages

Showing posts with label C#. Show all posts
Showing posts with label C#. Show all posts

Friday, May 2, 2014

Introducing MathCap for Asp.Net [ Math Captcha Plugin ]

MathCap is a plugin for .net application and its a 100% effective and easy to use.the more you understand on a deep look.

Here i shared is the base version of Mathcap 1.0.0. More feature are coming on a newer versions.

How it use?

add mathcapp dll reference

invoke the namespace on the webpage using MathCapcha;

Add the below code
                var bitmapImage = new Capcha();
                var properties = new MathCapchaProperties();
now customise the properties


now get the response and point to image control, using below code.

               var imgur = bitmapImage.CreateThumbnail(properties);
 
               img.Src = imgur.bmpImageSource; 
               Response.Write(imgur.answer);

Output














NOTE: In near by future itself 'm planning to make it a control but before that i need to add some cool feature that by i made it like this :)

DOWNLOAD dll From here

If u had any trouble just ask, Happy to help u :)
Stay Tune...
Have a nice day... 'N happy Coding :)

Wednesday, April 2, 2014

GET SET in C#

Get:
The get { } implementation must include a return statement. It can access any member on the class.

Set:
The set { } implementation receives the implicit argument 'value', which is the value to which the property is assigned.

Monday, March 3, 2014

upcoming feature in c#

1.Add "?." operator to C#

2.Allow "default" values on automatic properties


These are some of the upcoming feature expecting in c# by there next update.http://visualstudio.uservoice.com/  visual studio admin team announced these stuff. 
 more info:
http://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/3990187-add-operator-to-c-
http://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/2163145-allow-default-values-on-automatic-properties

If u had any trouble just ask, Happy to help u :) 
Stay Tune... 
Have a nice day... 'N happy Coding :)

Thursday, December 19, 2013

Using linq and lambda expression in c#

using linq and lambda expression in c#

using linq and lambda expression in c# to filter data.


  • Select all
  • Select some filed
  • Select filtering data with condition
  • Select Anonymous Type / Casting
  • Merging two columns
  • Ordering
  • Joining two list
  • Skip and Take 


Wednesday, October 30, 2013

linq to loop through datatable c#

Iterating through a data table using linq in c#

i faced a criteria to trim a row value with some criteria,

Before trimming

 



After trimming















C# Code





If u had any trouble just ask, Happy to help u :)
Stay Tune...
Have a nice day... 'N happy Coding :)

Tuesday, September 24, 2013

Monday, September 23, 2013

Action Delegates in c#

In my last post i shown FUNC Delegates now going around ACTION delegates
        
            Action instance can receive parameters, but cannot return values.
 Example below:
  1. How to execute a line
  2. How to execute a method

Thursday, September 19, 2013

Monday, July 15, 2013

Accessing active directory using c#

Hi *.*,
Today i'm sharing a snippet to Accessing active directory using c#. i had created a class file for modular access.Here it goes



using System;
using System.DirectoryServices.AccountManagement;
using System.DirectoryServices;
using System.Configuration;
using System.Collections.Generic;

Sunday, April 21, 2013

call C# dll using Javascript ActiveX Object

call C# dll using Javascript ActiveX Object

I got a chance to work with siebel crm . The Version they were using is working with ActiveX Object. My objective is we had a dll which has been created in .net class library output.I need to call that library using javascript and do some functionality. Here i'm sharing how i communicate dll with ActiveX using javascript.


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

Friday, April 19, 2013

Retrieve data from sugarcrm using c# api with conditional query

Retrieve data from sugarcrm using c# api with conditional query


Before going through this module i strongly recommend to go through my previous post abt this topic as i'm writing as a continuation its difficult to get in track for new readers. Previous Post

create an instance of the dll

  SugarCRMCL.SugarSOAP.sugarsoap client = new SugarCRMCL.SugarSOAP.sugarsoap();

To reterive data



NB: While using query keep in mind that its key sensitive 


If u had any trouble just ask, Happy to help u :)
Stay Tune...
Have a nice day... 'N happy Coding :)

Tuesday, April 9, 2013

Login Using Sugar API in asp.net c#

Hi *.*,

Before going through this module i strongly recommend to go through my previous post abt this topic as i'm writing as a continuation its difficult to get in track for new readers. Previous Post

Create an instance of the dll we refereed.


  SugarCRMCL.SugarSOAP.sugarsoap client = new SugarCRMCL.SugarSOAP.sugarsoap();


Login Module


Your password should be encrypted before sending to the crm. Sample encryption method below



If u had any trouble just ask, Happy to help u :)
Stay Tune...
Have a nice day... 'N happy Coding :)

Monday, April 8, 2013

Passing store procedure result to another store procedure as parameter

Passing store procedure result to another store procedure as parameter

-- First Stored ProcedureCREATE PROCEDURE SquareSP@MyFirstParam INT
AS
DECLARE 
@MyFirstParamSquare INT
SELECT 
@MyFirstParamSquare = @MyFirstParam*@MyFirstParam-- Additional CodeRETURN (@MyFirstParamSquare)GO

sugar crm api using c# (Consuming soap service)

Hi *.*,
From last one month i was on air.fully after sugar crm api.my job was to create UI on .NET by consuming there api.As i get into the api i realized there no working sample or anything they providing for .net.Using custom class output for service some really stupid stuff.Now i remember a comment abt this crm in sourceforge.net
 very little support & stability has been present in the open source version - very disappointing
Its really unfortunate!!!!! but my client need that. :( Anyway i completed the project with lot of effort and pain. Even in my first project i didn't have this much mental load.Here i'm posting some of the basic steps.

Create a class library project [sample name i used sugarCRMCL]. build the solution first.
Right click on project file and click on add service reference >> Click on advanced




>> add web reference  
Add the service url at the text-box and hit enter key 





























Click on add reference. Build your solution once and get the dll file from bin >>debug folder.

Now create new asp.net project environment. add that dll as reference to the bin folder.



On next day lets go with Login module  :)



Friday, February 22, 2013

Scroll text on webpage


Scroll text on webpage

Front end

<table width="100%" cellspacing="0px" cellpadding="0px" class="NewsBgColor">
    <tr>

Monday, February 11, 2013

Bind Dropdown on Footer templete


protected void grdRequestHandling_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            try
            {
                if (e.Row.RowType == DataControlRowType.Footer)
                {
                    DropDownList dropdown = e.Row.FindControl("ddlAddRole") as DropDownList;

                    dropdown.DataSource = objBL.GetRoles();
                    dropdown.DataTextField = "RoleName";
                    dropdown.DataValueField = "RoleId";
                    dropdown.DataBind();
                }
            }
            catch (Exception)
            {
               
            }
        }


If u had any trouble just ask, Happy to help u :)
Stay Tune...
Have a nice day... 'N happy Coding :)

Thursday, February 7, 2013

decrypt a string in javascript which encrypted in c#

encrypted in string in c# and decrypt that in JavaScript


Code behind  
protected void Page_Load(object sender, EventArgs e)
    {
        Hdn.Value = "sdsd".EncodeTo64();
    }

Friday, February 1, 2013

addition operation in Grid inside the text box using javascript

Having addition operation on gridview in JavaScript.


<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>

Wednesday, January 30, 2013

Remove Duplicate Row from datatable in c#

As i was also unaware of this feature until i read as answer in fourms.asp.net (link). Previously i was achieved by using lambda expression.Now no need to those just one line code :)


DataTable dt = new DataTable
        {
            Columns ={
                {"Myid",typeof(int)},
                {"Name"},
                {"Address"}
                }
        };
        dt.Rows.Add(1, "Arun Aravind", "Kollam");
        dt.Rows.Add(1, "Arun Aravind", "Kollam");
        dt.Rows.Add(2, "Arun Aravind", "Kollam");
        dt.Rows.Add(2, "Arun Aravind", "Kollam");
        dt.Rows.Add(3, "Arun Aravind", "Kollam");

        dt = dt.DefaultView.ToTable(false, "Address", "Name", "Myid");

Output




If u had any trouble just ask, Happy to help u :)
Stay Tune... Have a nice day... 'N happy Coding :)