Quantcast
Channel: Web Forms
Viewing all articles
Browse latest Browse all 23244

//forms163.rssing.com/chan-8117652/article1351-live.html

$
0
0

I used below code . But it rendering in same page. not redirect to specific page . Please look at the code

aspx

<a href='<%# GlobalMethods.GetEncryptedInvoiceLink(Convert.ToInt32 (Request.QueryString["InvoiceId"])) %>'>dddddd <%# GlobalMethods.GetEncryptedInvoiceLink(Convert.ToInt32 (Request.QueryString["InvoiceId"])) %></a> 

web.config

<add key="PayPalMailLink" value="http://localhost:50843/xxxxxt.Web/InvoiceMail.aspx?InvoiceId="/>

.cs

public static string GetEncryptedInvoiceLink(int invoiceID)
{
return System.Configuration.ConfigurationManager.AppSettings["PayPalMailLink"] + GetEncryptedInvoiceID(invoiceID);
}
public static string GetEncryptedInvoiceID(int invoiceID)
{
int lowestedEncryptedInvoiceID = int.Parse(System.Configuration.ConfigurationManager.AppSettings["lowestEncryptedInvoiceID"]);
if (lowestedEncryptedInvoiceID > invoiceID)
return invoiceID.ToString();
string encryptedInvoiceID = EncryptHelper.Encrypt(invoiceID.ToString(), invoiceEncPass);
//encryptedInvoiceID = encryptedInvoiceID.PadRight(encryptedInvoiceID.Length + (4 - encryptedInvoiceID.Length % 4) % 4, '=');

System.Text.StringBuilder result = new System.Text.StringBuilder(encryptedInvoiceID.TrimEnd('='));
result.Replace('+', '-');
result.Replace('/', '_');

//return HttpUtility.UrlEncode(result.ToString());
return result.ToString();
}

after complete this method it showing correct url. but not redirect.

Thanks


Viewing all articles
Browse latest Browse all 23244

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>