Category C#.Net

Function to generate random password in c#

Category: C#.Net Comments: No comments

Generate Random password according to your length. 

public string RandomListOfStringCharecters(int length)
{
string temp = “ABCDEFGHIJKLMNOPQRSTUVWXYZ0987654321!@#$%^&*()abcdefghijklmnopqrstuvwxyz”;
Random rand = new Random();
string output = “”;
int j = 0;
for (int i = 0; i < length; i++)
{
j = rand.Next(temp.Length);
output += temp[j].ToString();
}
return output;
}

 

Read More

Payment through paypal in asp.net

Category: ASP.NETC#.NetPAYMENT GATEWAY Comments: No comments

1. For Test First register it and login before payment. https://developer.paypal.com/ 2. Initialize Item for payment //Query String of Item Detail to send item description to paypal private string GetItemDtetail() { string strPayPalUrlType ="https://www.sandbox.paypal.com/cgi-bin/webscr";// For Test string strPayPalUrlType ="https://www.sandbox.paypal.com/cgi-bin/webscr";// For Live string cmd = "_xclick"; string redirect = ""; redirect += strPayPalUrlType; redirect += "?cmd=" + cmd;Read More

Payment through Authorize.net in C#

Category: ASP.NETC#.NetPAYMENT GATEWAY Comments: No comments

1. Test Card Details Card Number: 4111111111111111 Cvv Code: 123 Exp Date:1013 2. Code // From serverside alert Function protected void jsCall(string alert) { string script = @"alert( """ + alert + @""" );"; ScriptManager.RegisterStartupScript(this, this.GetType(), "jsCall", script, true); } private bool AuthorizePayment() {Read More