trying to retrieve some data from the database and put in into my form. the code goes
notificationList.Add(new notificationForm(
(String)dataset.Tables["alertdetails"].Rows[0]["memberName"],
(String)dataset.Tables["alertdetails"].Rows[0]["locationName"],
(String)dataset.Tables["alertdetails"].Rows[0]["photo"],
"",
(String)dataset.Tables["alertdetails"].Rows[0]["memberid"],
"",
"", x, y, alertId));
the arguments for my notificationForm is
public notificationForm(String name, String location, String imageExtension,
String alertType,String memberid,String date,String time,
int x,int y,String alertid)
the error goes
Unable to cast object of type 'System.Int32' to type 'System.String'.
on the line whereby i retrieve memberid. anyone know how to fix that? it works fine for memberName, locationName and photo though.