May 21, 2014

How to implement bangk payment gateway in html ?

HTML Code:

<!--bangk gateway-->
    <a href =''
        Click to Buy Now
    </a>   // Replace xxxxxxxxxxxxxxxxxxx to your business_account_number of bangk gateway
<!--/bangk gateway-->

UI :

How to implement gspay payment gateway in html ?

HTML Code:

<!--GSPay gateway-->  
<form target=_new method=post
    <input type=hidden name="siteID" value="xxxxx"> // replace xxxxx to your siteId on GSPay
    <input type=hidden name='OrderDescription[1]' value='PC Tuneup Software'>
    <input type=hidden name='Amount[1]' value='10'>
    <input type=hidden name='Qty[1]' value='1'>
    <input type="hidden" name="OrderID" value="25Nov2008152022_25" />
    <input type="hidden" name="customerFullName" value="Md Boktiar Rahaman" />
    <input type="hidden" name="customerEmail" value="" />
        <input type="hidden" name="returnURL" value="" />
        <input type="hidden" name="ApproveURL" value="" />
        <input type="hidden" name="DeclineURL" value="" />
    <input type=submit value="Checkout">
<!--/GSPay gateway-->


Mar 21, 2014

How to implement Folder Browser Dialogbox (FolderBrowserDialog) in c#

C# Code:

string folder=””;
using (FolderBrowserDialog dialog = new FolderBrowserDialog())
    dialog.Description = "Open a folder which contains your files”;
    dialog.ShowNewFolderButton = false;
    dialog.RootFolder = Environment.SpecialFolder.MyComputer;
    if (dialog.ShowDialog() == DialogResult.OK)
        folder = dialog.SelectedPath;


How to implement open filedialogbox in c#

C# Code:

String ImagePath=””;
OpenFileDialog OpenFileDialog1 = new OpenFileDialog();
OpenFileDialog1.InitialDirectory = Convert.ToString(Environment.SpecialFolder.MyDocuments);
OpenFileDialog1.Filter = "(*.png)|*.png|All Files (*.*)|*.*";
OpenFileDialog1.FilterIndex = 1;

if (OpenFileDialog1.ShowDialog() == DialogResult.OK)
    ImagePath= OpenFileDialog1.FileName;


How to get Filename with extension from path in c#

C# Code:

string FilePath ="D:\\images\\1.png";

string Extention = Path.GetFileName(FilePath);

How to get only File extension from path in c#

C# Code:

string FilePath ="D:\\images\\1.png";

string Extention = Path.GetExtension(FilePath);

How to get Filename without extension from path in c#

C # Code:

string FilePath ="D:\\images\\1.png";

string Filename = Path.GetFileNameWithoutExtension(FilePath);

How to resizeImage and save using c#.Net

C# Code:

private Bitmap SetResizeImage(string strImg, string FileName, int Imagewidth, int ImageHeight)
    int nnx = Imagewidth;
    int nny = ImageHeight;
    System.Drawing.Image img = System.Drawing.Image.FromFile(strImg);
    Bitmap cpy = null;
    cpy = new Bitmap(nnx, nny);
    using (Graphics gr = Graphics.FromImage(cpy))
        gr.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.High;
        gr.DrawImage(img, new Rectangle(0, 0, nnx, nny), new Rectangle(0, 0, img.Width, img.Height), GraphicsUnit.Pixel);
   return cpy;


Mar 19, 2014

How to insert a list (Data) in google spreadsheet in c# ?

Before coding, create uri for your spreadsheet, see below setpes:
1.login to google drive and open your spreadsheet
2.Download spreadsheet through (File -> Dowanload as -> Webpage) then new page will be oped

Feb 28, 2014

Display picture from folder in

//Display picture from folder i.e saved picture 
string[] images = Directory.GetFiles(Application.StartupPath + "\\images\\", "*.jpg");
string picName="softtechsolving.jpg"; //here softtechsolving.jpg is search items
string picName1 = picName;
int index = 0;
foreach (string file in images)
        string hasPicName = Path.GetFileName(file).ToString();
        if (hasPicName.ToString() == picName1.ToString())