There are tow ways to stroe the images.
One way,save the image in local hard disk and save the path of the image in database.
else, Save the image in byte array format in database but this makes the database heavy.
Please take a look at following link. This is a small useful blog
which describe that how to insert image in database using c#.
This might be useful for you.
In our site I am trying to integrate the CITI Bank payment gateway .For canceling a payment we need to send the post request from merchant site to payment gateway site .For this I am using the web request method , I am posting the parameters to the payment gateway server using the web request but not getting the web response , it is giving the error as The remote server returned an error: (500) Internal Server Error . I am not understanding whether the problem is with the web request or I am not sending the request properly to the gateway . Can anyone please let me know is there any other way to post the request from server to server other than web request method .
The remote server returned an error: (500) Internal Server Error
If you are sending web request as per their code functionality then its not your error.Sometimes if you are not sending all the parameters which the gateway needs then this error may occur..!
Sometimes the http request waits for particular time to get the response from the server and if it did not get any response this error may occur..!
Here is the sample method for authorize .net for gateway hope it helps..!
private string CreditCardCheck()
String strPost = "x_login=" + loginID + "&x_tran_key=" + trans_Key ;
StreamWriter myWriter = null;
string url ="https://secure.authorize.net/gateway/transact.dll";
HttpWebRequest objRequest = (HttpWebRequest)WebRequest.Create(url);
objRequest.Method = "POST";
objRequest.ContentLength = strPost.Length;
objRequest.ContentType = "application/x-www-form-urlencoded";
myWriter = new StreamWriter(objRequest.GetRequestStream());
catch (Exception ex)
HttpWebResponse objResponse = (HttpWebResponse)objRequest.GetResponse();
using (StreamReader sr =
result = sr.ReadToEnd();
string responsedetails = result.Split('|');
TrasactionId = responsedetails.ToString();
// Close and clean up the StreamReader
if (result.ToLower().Contains("invalid") || result.ToLower().Contains("inactive"))
return "CreditCardis notvalid";
return TrasactionId ;
Why Do Some People Forget To Mark as Answer .If It Helps.
The aspx Page is dicided in to two[Left pane & Right Pane]
In Left pane the Function[say to calculate 2 nmbrs,CALCULATE Button]
On Clicking the CALCULATE Button the function calls the java script..and the result should be shown in the Right pane,I mean the page has to be refreshed and the rsult should be shown in the same page..
acc to my requiremnt i cant use i frame so am using frame set which is working i have a tree view in left side of my pge. while clicking any button of tree view i should get data in right of my frame. the full page shld not get redirected. The tree view and the buttons on shld be visible always. this is my prob. which code shld i use nw help me. hw to fetch the data and put in our selected place?.can v redirect the page in a single to other frame?
Last Visit: 31-Dec-99 18:00 Last Update: 25-Jul-21 0:55