Sivakumar

Sivakumar

  • NA
  • 551
  • 219.4k

How to convert list to string

Apr 5 2016 10:44 AM
Hi,
 
This is my view :
 
protected void ButtonSave_OnClick(object sender, EventArgs e)
{
List<Placeholder> _placeholder = (List<Placeholder>)Session["listPlaceholder"];
OrdersModel order = new OrdersModel();
order.UserID = (int)Session["userId"];
order.TemplateID = (int)Session["TemplateID"];
order.Price = ((List<MapAddress>)Session["SelectedAddress"]).Count * 1;
var address = (List<MapAddress>)Session["SelectedAddress"];
_orderBL.ConfirmOrder(address, _placeholder,order);
}
 
and this is my Business Layer :
 
 
public string ConfirmOrder(string address, string _placeholder, OrdersModel order)
{
try
{
OrdersDL _ordersDL = new OrdersDL(); // Creating object of Dataccess
return _ordersDL.ConfirmOrder(address,_placeholder,order); // calling Method of DataAccess
}
catch
{
throw;
}
}
 
But here shows error like cannot convert list to string
 
Please help me.
 
Thanks 
 

Answers (3)