Saturday, February 27, 2010

IsCrossPagePostback–pass data from one page to another

Hello friends
again with new concept..

in many case we are supposed to pass data from one page to another page.

So we can pass data through Querystring, ,
this options are quiet helpful when Data is less in quantity.. but now what if we want whole page to another page… ?

and in previous page Data is in very big amount around 20 – 40 fields…
so it is not feasible to pass that data in querystring or storing all data in session.

there also another ways, like Cookie or hiddenfields using Post method.. but
all this require more trouble..

but what if we get previous page controls like it is “on same page”

for that we have a good option called IsCrossPagePostback 

it is same like our Page.IsPostBack.
Page.IsPostBack treats only for current page’s postback
but to track weather postback is from Current page or previous page we can use IsCrossPagePostBack.

One Important Note : Respose. Redirect will not help us to track IsCrossPagePostBack
for that we must have Server.Transfer or PostbackURL of Button control

So here we have a sample of IsCrossPagePostBack

in First.aspx
   1: <%@ Page Language="C#" AutoEventWireup="true" CodeFile="First.aspx.cs" Inherits="First" %>
   3: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
   4: <html xmlns="">
   5: <head runat="server">
   6:     <title>First Page</title>
   7: </head>
   8: <body>
   9:     <form id="form1" runat="server">
  10:     <div>
  11:         <asp:Label ID="label1" runat="server" Text="This is First Page"></asp:Label>
  12:         <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
  13:         <asp:Button ID="Button1" runat="server" Text="Pass To Second Page" PostBackUrl="~/Second.aspx" />
  14:     </div>
  15:     </form>
  16: </body>
  17: </html>

Now in Second.aspx

   1: <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Second.aspx.cs" Inherits="Second" %>
   3: <%@ PreviousPageType VirtualPath="~/First.aspx" %>
   4: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
   5: <html xmlns="">
   6: <head runat="server">
   7:     <title>Second Page</title>
   8: </head>
   9: <body>
  10:     <form id="form1" runat="server">
  11:     <div>
  12:         <asp:Label ID="Label1" runat="server"></asp:Label>
  13:     </div>
  14:     </form>
  15: </body>
  16: </html>

in this page very important line is  line no 3

here the Reference is set to inherit controls of Previous page

   1: public partial class Second : System.Web.UI.Page
   2: {
   3:     protected void Page_Load(object sender, EventArgs e)
   4:     {
   5:         if (PreviousPage != null && PreviousPage.IsCrossPagePostBack)
   6:         {
   7:             TextBox text = PreviousPage.FindControl("TextBox1") as TextBox;
   9:             if (text != null)
  10:             {
  11:                 Label1.Text = " This is from From First Page : " + text.Text;
  12:             }
  13:             else
  14:             {
  15:                 Label1.Text = "Empty !!!!";
  16:             }
  17:         }
  18:     }
  19: }

in page load it is very easy to fetch data of previous page..

so this is very simple if the pages are within same project..

we will see very soon when page is in another project means RemotecrossPage

All The Best

Thursday, February 25, 2010

Query for Recursive Data

Hi friends..

here is the query for Data kind of Recursive.
For Example….
for a particular thread in forum, its Comments
so in this case…
The Data structure will be like this
Id int
ThreadText nvarchar(MAX)
PostedBy int
PostedOn DateTime
ParentId int

Now if we want to have the hierarchical View of Data.
We can have query like this
   1: SELECT , , as ParentId, as ParentName
   2: FROM         Table_3 AS T1 INNER JOIN
   3:                       Table_3 AS T2 ON = T2.parentid

now the Task is to Arrange the Data how you want to Display..

All the best

Sunday, February 14, 2010

Trigger with multiple insert/ Update/Delete

Hello Friends
Recently i faced a problem and got solution of it so..
i would like to put the solution on my Blog

I wanted to use Trigger to drop entries in a table on insertion of records in its parent table...
on first phase i created a trigger for the parent table (Table_1) to drop entries on Table_2.

this was working very perfectly...
but suddenly i came to know that it is not as per i expected...

i mean when i fire query of Insert using single record insert
i.e Insert into Table_1 (...fields..) values (...values..)

in this case it was perfectly fine...

but issue was when i fire query of multiple records to insert on a single query
i.e. Insert into Table_1
     select [Name],[Address] from Table_3
In this case the trigger fires only once for first record
so i was not getting rest records inserted into Table_2

after doing small RnD I came to know...the exact solution

Sunday, February 7, 2010

Payment Gateway List World wide

  •,, United States 
  • Bank Merchant POS (BMP), Bank of China, China
  • Bibit, Bibit Internet Payments, Netherlands
  •, Facilitate I.T. Inc., Canada
  • Biz*Star PX, Shanghai Shared Data Network Co. Ltd (SSDN), Singapore
  • Business Gateway Service, WorldCom, Japan
  • Buy-Line, Bank of New Zealand, New Zealand
  • CAFIS, NTT Data Corp., Japan
  • Cambist, Cambist Merchant Solutions, United States
  • Camtech, Camtech Corp., Australia
  • CCNow, CCNow, Inc., United States
  • Chinatrust, Chinatrust Commercial Bank (CTCB), Taiwan, Province of China
  • CIBC, Canadian Imperial Bank of Commerce, Canada
  • CIPAS Indonesia, PT. CIPAS Indonesia, Indonesia
  • iBill, Internet Billing Company, Ltd., United States
  • Anacom, Anacom Merchant Services, United States
  • CitiBank
    , CitiBank India, India
  • ClearCommerce, ClearCommerce Corp., United States
  • ClickBank, Keynetics Inc., United States
  • ClickPay, Professo, LLC, United States
  • Ecgate, Ecnet, South Africa
  • CMB, China Merchants Bank, China
  • Comtrust, Comtrust, United Arab Emirates
  • CyberCash, VeriSign Payment Services, United States
  • CyberSource, CyberSource Corp., United States
  • DataCash, DataCash Ltd., United Kingdom
  • DirectLink, Plug 'n Pay Technologies, Inc., United States
  • DnB, DnB - Den norske Bank, Norway
  • E-Commerce Africa, E-Commerce Africa, Netherlands
  • Banco Comercial Portugues, Banco Comercial Português, Portugal
  • ePDQ, Barclaycard Merchant Services, United Kingdom
  • E-Payment,
    Interactive Worldwide Limited, Australia
  • e4Sure, e4asia Inc., Thailand
  • CyberMUT, Groupe Crédit Mutuel, France
  • EBS, Electronic Billing
    Systems AG, Germany
  • ECHOnline, Electronic Clearing House, Inc.,
  • eops, eops AG, Germany
  • ePagos, ePagos Merchant Services, United States
  • eSec Payment Service, eSec Ltd., Australia
  • eStores, Bank of America, United States
  • EuroDebit, Moreband Corp. NV, Netherlands Antilles
  • FirstEcom, First Ecom, HongKong
  • GestPay, Banca Sella S.p.A., Italy
  • HDFCBank, HDFC Bank, Ltd., India
  • I.N.G, Internet Networking Group, Netherlands
  • IntelliPay, IntelliPay Inc., United States
  • IPGS, Visa, United States
  • iVeri, eCompany Ltd., South Africa
  •, Justgiving, United Kingdom
  • Ka-Chingg and TPG, iPayment Technologies, United States
  • Kagi, Kagi, United States
  • LinkPoint, CardService International, United States
  • LiveProcessor, Paymentplus, Inc., United States
  •, De Postel BV, Netherlands
  • NetBanx, NetBanx Ltd., United Kingdom
  • Netbilling, Automated Billing Services, United States
  • Online Charge, Innuity, Inc., United States
  • OrderButton, OrderButton.Net, Inc., United States
  • Pago PAY, Pago eTransaction Services GmbH, Germany
  • PAY@db, Deutsche Bank, Germany
  •, Alkor Group of Companies, Russian Federation
  • PayControl, Netcetera AG, Switzerland
  • PayFlow, VeriSign Payment Services, United States
  • Paymentservice,, Austria
  • PayPal, PayPal, United States
  • PaySeal, ICICI ePayments Ltd., India
  • PayWare, Trintech Group plc, Ireland
  • PayWay, Nobil IT Corporation, Canada
  • PlanetPayment, Planet Group Inc., United States
  • QPAY and QTILL, QENTA paymentsolutions GmbH, Austria
  • QSI Client Class, QSI Payments, Australia
  • Secure-e-pay, Global Tele-Systems Ltd., India
  • SecurePay, SecurePay Pty Ltd., Australia
  • SecureTrading, SecureTrading, United Kingdom
  • Setcom, Setcom (Pty) Ltd., South Africa
  • SIPS, Siam Commercial Bank PCL., Thailand
  • Solo e-payment, Solo Market/Merita Bank Plc, Finland
  • Speedpay, E Commerce Group, United States
  • SurePay, SurePay LP, United States
  • Telecharge Canada, TeleCharge Canada, Canada
  • Telecommerce, France Telecom, France
  • Thirt,, South Africa
  • TOPGate, Shanghai Bankcard Network Services Corp., China
  • USA ePay, GorCorp Inc., United States
  • VIP, Virbus AG, Germany
  • Beanstream, Beanstream Internet Commerce, Inc., Canada
  • WebCollect, GlobalCollect, Netherlands
  •, WebMoney Transfer, Russian Federation
  • Webpay, Transbank, Chile
  • WorldPay, WorldPay plc, United Kingdom

Payment Gateways

After a long time... Again on ground...

Ha ha ha
With new concept...
This time i am with Payment Gateways...

let's start from initial point (from client Requirement )
Suppose Client requirement is to integrate payment Gateways...
then our quick Questions should be