protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
int ID = Convert.ToInt16(Request.QueryString["Items"]);
if (ID > 0)
BindEditDetails(ID);
}
private void BindEditDetails(int ID)
{
try
{
SPSite mySite = SPContext.Current.Site;
SPWeb OWeb = mySite.OpenWeb();
OWeb.AllowUnsafeUpdates = true;
SPList OList = OWeb.Lists["SendEmail to Users"];
SPListItem oListItem = OList.Items.GetItemById(ID);
ToBox.Text = oListItem["EmailId"].ToString();
}
finally
{
}
}
{
if (!IsPostBack)
{
int ID = Convert.ToInt16(Request.QueryString["Items"]);
if (ID > 0)
BindEditDetails(ID);
}
private void BindEditDetails(int ID)
{
try
{
SPSite mySite = SPContext.Current.Site;
SPWeb OWeb = mySite.OpenWeb();
OWeb.AllowUnsafeUpdates = true;
SPList OList = OWeb.Lists["SendEmail to Users"];
SPListItem oListItem = OList.Items.GetItemById(ID);
ToBox.Text = oListItem["EmailId"].ToString();
}
finally
{
}
}
No comments:
Post a Comment