private void ConfirmCart(object sender, EventArgs e, string propertyId) { BuyerValidations buyerValidationObj = new BuyerValidations(); int BuyerID_login = int.Parse(Session["userId"].ToString()); List <Property> propertyList = new List <Property>(); BuyerValidations buval = new BuyerValidations(); StringBuilder sb = new StringBuilder(); propertyList = buyerValidationObj.DeletefromCart(int.Parse(propertyId), BuyerID_login); foreach (var k in propertyList) { sb.Append("Name: " + k.PropertyName + "\n"); sb.Append("Type: " + k.PropertyType + "\n"); sb.Append("Option :" + k.PropertyOption + "\n"); sb.Append("Description :" + k.Description + "\n"); sb.Append("Address :" + k.Address + "\n"); sb.Append("Price: " + k.PriceRange + "\n"); sb.Append("Intial Deposit: " + k.InitialDeposit + "\n"); sb.Append("LandMark:" + k.Landmark + "\n"); sb.Append("The Above Property will be Deleted from cart...!"); Response.Write("<script>alert('data deleted from cart :" + k.PropertyName + "');</script>"); } Page.Response.Redirect(Page.Request.Url.ToString(), true); // string data = sb.ToString(); // Response.Write("<script>alert('data added to cart :" + data + "');</script>"); }
private void btnSubmit_Click(object sender, RoutedEventArgs e) { UsersValidations userObj = new UsersValidations(); User newUser = new User(); BuyerValidations buval = new BuyerValidations(); Buyer buyer = new Buyer(); buyer.UserName = txtName.Text; buyer.FirstName = txtFName.Text; buyer.LastName = txtLName.Text; buyer.DateOfBirth = dob.SelectedDate.Value; buyer.PhoneNo = txtNumber.Text; buyer.EmailId = txtEmail.Text; string x = txtPassword.Password; newUser.Password = x; newUser.UserName = buyer.UserName; newUser.UserType = "Buyer"; buval.AddBuyer(buyer); userObj.AddUser(newUser); MessageBox.Show("Buyer added successfully"); NavigationService nav = NavigationService.GetNavigationService(this); nav.Navigate(new Uri("Login.xaml", UriKind.RelativeOrAbsolute)); }
private void ConfirmCart(object sender, EventArgs e, string propertyId) { BuyerValidations buyerValidationObj = new BuyerValidations(); List <Property> propertyList = new List <Property>(); BuyerValidations buval = new BuyerValidations(); StringBuilder sb = new StringBuilder(); int BuyerID_login = int.Parse(Session["userId"].ToString()); propertyList = buyerValidationObj.AddToCart(int.Parse(propertyId), BuyerID_login); foreach (var k in propertyList) { Response.Write("<script>alert('" + k.PropertyName + "<br/>This property added to cart :');</script>"); sb.Append("Name: " + k.PropertyName + "\n"); sb.Append("Type: " + k.PropertyType + "\n"); sb.Append("Option :" + k.PropertyOption + "\n"); sb.Append("Description :" + k.Description + "\n"); sb.Append("Address :" + k.Address + "\n"); sb.Append("Price: " + k.PriceRange + "\n"); sb.Append("Intial Deposit: " + k.InitialDeposit + "\n"); sb.Append("LandMark:" + k.Landmark + "\n"); sb.Append("The Above Property is Added to cart successfully..."); } // string data = sb.ToString(); // Response.Write("<script>alert('data added to cart :" + data + "');</script>"); }
private void btnLogin_Click(object sender, RoutedEventArgs e) { try { User login = new User(); UsersValidations userObj = new UsersValidations(); SellerValidations sellerObj = new SellerValidations(); BuyerValidations buyerObj = new BuyerValidations(); login.UserName = txtUserName.Text; login.Password = txtPass.Password; login = userObj.LoginUser(login); if (login != null) { if (login.UserType.ToLower() == "admin") { Admin sp = new Admin(); this.NavigationService.Navigate(sp); } else if (login.UserType.ToLower() == "seller") { int sellerId = sellerObj.SellerId(login.UserName); SellerPage sp = new SellerPage(sellerId); this.NavigationService.Navigate(sp); } else if (login.UserType.ToLower() == "buyer") { int buyerId = buyerObj.BuyerId(login.UserName); ShowAllProperties_Buyer sp = new ShowAllProperties_Buyer(buyerId); this.NavigationService.Navigate(sp); } MessageBox.Show("Login Successful!!"); } else { txtUserName.Text = ""; txtPass.Password = ""; throw new UserException("UserName/Password is required"); } } catch (UserException ex) { MessageBox.Show(ex.Message, "Alert"); } }
protected void btnLogin_Click(object sender, EventArgs e) { User login = new User(); UsersValidations userObj = new UsersValidations(); SellerValidations sellerObj = new SellerValidations(); BuyerValidations buyerObj = new BuyerValidations(); login.UserName = txtUserName.Text; login.Password = txtPassword.Text; login = userObj.LoginUser(login); if (login != null) { if (login.UserType.ToLower() == "admin") { Session["userName"] = login.UserName; Response.Redirect("Admin.aspx"); } else if (login.UserType.ToLower() == "seller") { int sellerId = sellerObj.GetSellerId(login.UserName); Session["userId"] = sellerId; Session["userName"] = login.UserName; Response.Redirect("SellerHome.aspx"); } else if (login.UserType.ToLower() == "buyer") { int buyerId = buyerObj.BuyerId(login.UserName); Session["userId"] = buyerId; Session["userName"] = login.UserName; Response.Redirect("DisplayResults.aspx"); } Response.Write("<script type='text/javascript'>alert( '" + login.UserName + "');</script>"); } //else //{ // throw new UserException("UserName/Password is invalid"); //} }
void ConfirmCart(object sender, EventArgs e, int PropID) { List <Property> propertyList = new List <Property>(); BuyerValidations buval = new BuyerValidations(); StringBuilder sb = new StringBuilder(); buval.GetBuyerId(buyerId); propertyList = buval.AddToCart(PropID); foreach (var k in propertyList) { sb.Append("Name: " + k.PropertyName + "\n"); sb.Append("Type: " + k.PropertyType + "\n"); sb.Append("Option :" + k.PropertyOption + "\n"); sb.Append("Description :" + k.Description + "\n"); sb.Append("Address :" + k.Address + "\n"); sb.Append("Price: " + k.PriceRange + "\n"); sb.Append("Intial Deposit: " + k.InitialDeposit + "\n"); sb.Append("LandMark:" + k.Landmark + "\n"); sb.Append("The Above Property is Added to cart successfully..."); } MessageBox.Show(sb.ToString()); }
void ConfirmCart(object sender, EventArgs e, int PropID, StackPanel StackOFDetails, WrapPanel wp) { List <Property> propertyList = new List <Property>(); BuyerValidations buval = new BuyerValidations(); StringBuilder sb = new StringBuilder(); propertyList = buval.DeletefromCart(PropID); foreach (var k in propertyList) { sb.Append("Name: " + k.PropertyName + "\n"); sb.Append("Type: " + k.PropertyType + "\n"); sb.Append("Option :" + k.PropertyOption + "\n"); sb.Append("Description :" + k.Description + "\n"); sb.Append("Address :" + k.Address + "\n"); sb.Append("Price: " + k.PriceRange + "\n"); sb.Append("Intial Deposit: " + k.InitialDeposit + "\n"); sb.Append("LandMark:" + k.Landmark + "\n"); sb.Append("The Above Property will be Deleted from cart...!"); } MessageBox.Show(sb.ToString()); wp.Children.Remove(StackOFDetails); }
protected void btnSubmit_Click(object sender, EventArgs e) { UsersValidations userObj = new UsersValidations(); User newUser = new User(); BuyerValidations buval = new BuyerValidations(); Buyer buyer = new Buyer(); buyer.UserName = txtUserName.Text; buyer.FirstName = txtFirstName.Text; buyer.LastName = txtLastName.Text; buyer.DateOfBirth = DateTime.Parse(txtDOB.Text); buyer.PhoneNo = txtPhoneNo.Text; buyer.EmailId = txtEmail.Text; newUser.Password = txtPassword.Text; newUser.UserName = buyer.UserName; newUser.UserType = "Buyer"; buval.AddBuyer(buyer); userObj.AddUser(newUser); Response.Redirect("Default.aspx"); }
/// <summary> /// Load Controls on OnInit event /// </summary> /// <param name="e"></param> override protected void OnInit(EventArgs e) { BuyerValidations buyerValidationObj = new BuyerValidations(); List <Property> propertyList = new List <Property>(); propertyList = buyerValidationObj.showProperties(state, city); if (propertyList == null) { Response.Write("<script>alert('There are no properties to be displayed');</script>"); } foreach (var k in propertyList) { string imgpath = @"Images\home_back.jpeg"; // Intializing the UI Controls... Label lblPropname = new Label { CssClass = "space" }; Label lblType = new Label { CssClass = "space" }; Label lblPropOption = new Label { CssClass = "space" }; Label lblPropDescription = new Label(); Label lblAddress = new Label(); Label lblPrice = new Label(); Label lblIntialdeposit = new Label(); Label lblLandMArk = new Label(); //Create Group Container Div HtmlGenericControl div = new HtmlGenericControl("div"); div.Attributes.Add("class", "form-group"); // dynamic image System.Web.UI.WebControls.Image img = new System.Web.UI.WebControls.Image(); img.ImageUrl = imgpath; // Mapping the Property data with UI controls... lblPropname.Text = k.PropertyName; lblType.Text = "Type : " + k.PropertyType + " "; lblPropOption.Text = "Option : " + k.PropertyOption + " "; // lblPropDescription.Text = "Description : \t" + k.Description; lblAddress.Text = "Address : " + k.Address + " "; lblPrice.Text = "Price : " + k.PriceRange + " "; lblIntialdeposit.Text = "Intial Deposit : " + k.InitialDeposit + " "; lblLandMArk.Text = "LandMark : " + k.Landmark + " "; // Appending All the UI Controls to stackpanel div.Controls.Add(lblPropname); div.Controls.Add(img); div.Controls.Add(lblType); div.Controls.Add(lblPropOption); div.Controls.Add(lblPrice); div.Controls.Add(lblIntialdeposit); div.Controls.Add(lblLandMArk); div.Controls.Add(lblAddress); div.Controls.Add(lblPropDescription); //// label for type //div.Controls.Add(new Label() //{ // Text = "Type :" + k.PropertyType, // CssClass = "col-md-2 control-label" //}); //button.. string propertyId = k.PropertyId.ToString(); var btnAddcart = new Button { ID = "btnClick" + propertyId, Text = "Add To Cart", // CssClass = "col-md-2 btn btn-info" }; btnAddcart.Click += (s, RoutedEventArgs) => { ConfirmCart(s, e, propertyId); }; // GetDataItem owner details.. var btnOwnerDetails = new Button { Text = "Get Owner Details", // CssClass = "col-md-2 btn btn-info" }; // Adding all the childs to div bodydiv.Controls.Add(div); bodydiv.Controls.Add(btnAddcart); bodydiv.Controls.Add(btnOwnerDetails); // After adding all the childs.. bodydiv.Controls.Add(new LiteralControl("<br /><br/>")); } }
/// <summary> /// Load Controls on OnInit event /// </summary> /// <param name="e"></param> override protected void OnInit(EventArgs e) { BuyerValidations buyerValidationObj = new BuyerValidations(); int BuyerID_login = int.Parse(Session["userId"].ToString()); List <Property> propertyList = new List <Property>(); propertyList = buyerValidationObj.showCart(BuyerID_login); if (propertyList == null) { Response.Write("<script>alert('No Properties');</script>"); } else { foreach (var k in propertyList) { string imgpath = @"Images\home_back.jpeg"; // Intializing the UI Controls... Label lblPropname = new Label { CssClass = "space", ForeColor = System.Drawing.Color.DarkBlue }; Label lblType = new Label { CssClass = "space" }; Label lblPropOption = new Label { CssClass = "space" }; Label lblPropDescription = new Label(); Label lblAddress = new Label(); Label lblPrice = new Label(); Label lblIntialdeposit = new Label(); Label lblLandMArk = new Label(); //Create Group Container Div HtmlGenericControl div = new HtmlGenericControl("div"); div.Attributes.Add("class", "form-group"); // dynamic image System.Web.UI.WebControls.Image img = new System.Web.UI.WebControls.Image(); img.ImageUrl = imgpath; // styles lblPropname.Style.Add("font-size", "25px"); lblPropname.Style.Add("font-family", "Century Gothic"); lblPropname.Style.Add("font-weight", "bold"); lblType.Style.Add("font-family", "Century Gothic"); lblType.Style.Add("font-weight", "bold"); lblPropOption.Style.Add("font-family", "Century Gothic"); lblPropOption.Style.Add("font-weight", "bold"); lblPropDescription.Style.Add("font-family", "Century Gothic"); lblPropDescription.Style.Add("font-weight", "bold"); lblAddress.Style.Add("font-family", "Century Gothic"); lblAddress.Style.Add("font-weight", "bold"); lblPrice.Style.Add("font-family", "Century Gothic"); lblPrice.Style.Add("font-weight", "bold"); lblIntialdeposit.Style.Add("font-family", "Century Gothic"); lblIntialdeposit.Style.Add("font-weight", "bold"); lblLandMArk.Style.Add("font-family", "Century Gothic"); lblLandMArk.Style.Add("font-weight", "bold"); // Mapping the Property data with UI controls... lblPropname.Text = k.PropertyName; lblType.Text = "Type : " + k.PropertyType + " || "; lblPropOption.Text = "Option : " + k.PropertyOption + " || "; // lblPropDescription.Text = "Description : \t" + k.Description; lblAddress.Text = "Address : " + k.Address + " "; lblPrice.Text = "Price : " + (int)k.PriceRange + " || "; lblIntialdeposit.Text = "Intial Deposit : " + (int)k.InitialDeposit + " || "; lblLandMArk.Text = "LandMark : " + k.Landmark + " || "; // Appending All the UI Controls to stackpanel div.Controls.Add(new LiteralControl("<br/>")); div.Controls.Add(lblPropname); div.Controls.Add(new LiteralControl("<br/><br/>")); div.Controls.Add(img); div.Controls.Add(lblType); div.Controls.Add(lblPropOption); div.Controls.Add(lblPrice); div.Controls.Add(lblIntialdeposit); div.Controls.Add(lblLandMArk); div.Controls.Add(lblAddress); div.Controls.Add(lblPropDescription); //// label for type //div.Controls.Add(new Label() //{ // Text = "Type :" + k.PropertyType, // CssClass = "col-md-2 control-label" //}); //button.. string propertyId = k.PropertyId.ToString(); var btnAddcart = new Button { Text = "Delete from Cart", CssClass = "btn btn-info" }; btnAddcart.Style.Add("font-family", "Century Gothic"); bodydiv.Controls.Add(div); bodydiv.Controls.Add(btnAddcart); btnAddcart.Click += (s, RoutedEventArgs) => { ConfirmCart(s, e, propertyId); }; // GetDataItem owner details.. // Adding all the childs to div // After adding all the childs.. // After adding all the childs.. bodydiv.Controls.Add(new LiteralControl("<br /><br/>")); } } }
private void btnShow_Click(object sender, RoutedEventArgs e) { BuyerValidations buval = new BuyerValidations(); WrapPanel wp = new WrapPanel(); Border myBorder1 = new Border(); if (onlyonce == 0) { onlyonce++; // border for stackpanel myBorder1.Background = Brushes.Blue; myBorder1.BorderBrush = Brushes.Orange; myBorder1.BorderThickness = new Thickness(1); // fetching all the property data from DB List <Property> propertyList = new List <Property>(); propertyList = buval.showProperties(); foreach (var k in propertyList) { StackPanel StackOFDetails = new StackPanel(); // Intializing the UI Controls... Button btn = new Button(); Label lblPropname = new Label(); Label lblType = new Label(); Label lblPropOption = new Label(); Label lblPropDescription = new Label(); Label lblAddress = new Label(); Label lblPrice = new Label(); Label lblIntialdeposit = new Label(); Label lblLandMArk = new Label(); // Mapping the Property data with UI controls... int propId = k.PropertyId; lblPropname.Content = "Name: " + k.PropertyName; lblType.Content = "Type: " + k.PropertyType; lblPropOption.Content = "Option :" + k.PropertyOption; lblPropDescription.Content = "Description :" + k.Description; lblAddress.Content = "Address :" + k.Address; lblPrice.Content = "Price: " + k.PriceRange; lblIntialdeposit.Content = "Intial Deposit: " + k.InitialDeposit; lblLandMArk.Content = "LandMark:" + k.Landmark; btn.Content = "AddToCart"; // Appending All the UI Controls to stackpanel StackOFDetails.Children.Add(lblPropname); StackOFDetails.Children.Add(lblType); StackOFDetails.Children.Add(lblPropOption); StackOFDetails.Children.Add(lblPrice); StackOFDetails.Children.Add(lblIntialdeposit); StackOFDetails.Children.Add(lblLandMArk); StackOFDetails.Children.Add(lblAddress); StackOFDetails.Children.Add(lblPropDescription); StackOFDetails.Children.Add(btn); wp.Children.Add(StackOFDetails); // ConfirmCart method will be called and name will be passed to same method... btn.Click += (s, RoutedEventArgs) => { ConfirmCart(sender, e, propId); }; } // Adding stackpanel to the WrapPanel... MyWrapPanel.Children.Add(wp); MyWrapPanel.Children.Add(myBorder1); } else { MessageBox.Show("We have listed all the data avialable....!"); } }
/// <summary> /// Load Controls on OnInit event /// </summary> /// <param name="e"></param> override protected void OnInit(EventArgs e) { BuyerValidations buyerValidationObj = new BuyerValidations(); if (propertyList == null) { Response.Write("<script>alert('There are no properties to be displayed');</script>"); } foreach (var k in propertyList) { string imgpath = @"Images\home_back.jpeg"; // Intializing the UI Controls... Label lblPropname = new Label { CssClass = "space" }; Label lblType = new Label { CssClass = "space" }; Label lblPropOption = new Label { CssClass = "space" }; Label lblPropDescription = new Label(); Label lblAddress = new Label(); Label lblPrice = new Label(); Label lblIntialdeposit = new Label(); Label lblLandMArk = new Label(); //Create Group Container Div HtmlGenericControl div = new HtmlGenericControl("div"); div.Attributes.Add("class", "form-group"); // dynamic image System.Web.UI.WebControls.Image img = new System.Web.UI.WebControls.Image(); img.ImageUrl = imgpath; // Mapping the Property data with UI controls... lblPropname.Text = k.PropertyName; lblType.Text = "Type : " + k.PropertyType + " "; lblPropOption.Text = "Option : " + k.PropertyOption + " "; // lblPropDescription.Text = "Description : \t" + k.Description; lblAddress.Text = "Address : " + k.Address + " "; lblPrice.Text = "Price : " + k.PriceRange + " "; lblIntialdeposit.Text = "Intial Deposit : " + k.InitialDeposit + " "; lblLandMArk.Text = "LandMark : " + k.Landmark + " "; // Appending All the UI Controls to stackpanel div.Controls.Add(lblPropname); div.Controls.Add(img); div.Controls.Add(lblType); div.Controls.Add(lblPropOption); div.Controls.Add(lblPrice); div.Controls.Add(lblIntialdeposit); div.Controls.Add(lblLandMArk); div.Controls.Add(lblAddress); div.Controls.Add(lblPropDescription); //// label for type //div.Controls.Add(new Label() //{ // Text = "Type :" + k.PropertyType, // CssClass = "col-md-2 control-label" //}); //button.. string propertyId = k.PropertyId.ToString(); HyperLink hyp = new HyperLink(); hyp.ID = "hypABD"; hyp.Text = "redirect"; hyp.NavigateUrl = "EditProperty.aspx?propId=" + propertyId; //Session["PropId"] = propertyId; //btnAddcart.Click += new EventHandler(this.btnAddcart_Click); // btnAddcart.Click += (s, RoutedEventArgs) => { Edit(propertyId); }; // Edit.Click += (se, ev) => this.Edit(se, ev, propertyId); bodydiv.Controls.Add(div); bodydiv.Controls.Add(hyp); // After adding all the childs.. bodydiv.Controls.Add(new LiteralControl("<br /><br/>")); // base.OnInit(e); } }
/// <summary> /// Load Controls on OnInit event /// </summary> /// <param name="e"></param> override protected void OnInit(EventArgs e) { BuyerValidations buyerValidationObj = new BuyerValidations(); List<Property> propertyList = new List<Property>(); if (ck == false) propertyList = buyerValidationObj.showProperties(state, city); else if(ck==true) propertyList = buyerValidationObj.GetPropertiesByPrice(min, max); else if (first == false) { HttpCookie reqCookies = Request.Cookies["sortInfo"]; if (reqCookies != null) { state = reqCookies["State"].ToString(); city = reqCookies["City"].ToString(); } propertyList = buyerValidationObj.showProperties(state, city); first = true; } if (propertyList == null && ck != null) Response.Write("<script>alert('There are no properties to be displayed');</script>"); int f = 0; foreach (var k in propertyList) { f++; string imgpath = @"Images\"+f+".jpeg"; // Intializing the UI Controls... Label lblPropname = new Label { CssClass = "space", ForeColor = System.Drawing.Color.DarkBlue }; Label lblType = new Label { CssClass = "space" }; Label lblPropOption = new Label { CssClass = "space" }; Label lblPropDescription = new Label(); Label lblAddress = new Label(); Label lblPrice = new Label(); Label lblIntialdeposit = new Label(); Label lblLandMArk = new Label(); //Create Group Container Div HtmlGenericControl div = new HtmlGenericControl("div"); div.Attributes.Add("class", "form-group"); // dynamic image System.Web.UI.WebControls.Image img = new System.Web.UI.WebControls.Image(); img.ImageUrl = imgpath; // styles lblPropname.Style.Add("font-size", "25px"); lblPropname.Style.Add("font-family", "Century Gothic"); lblPropname.Style.Add("font-weight", "bold"); lblType.Style.Add("font-family", "Century Gothic"); lblType.Style.Add("font-weight", "bold"); lblPropOption.Style.Add("font-family", "Century Gothic"); lblPropOption.Style.Add("font-weight", "bold"); lblPropDescription.Style.Add("font-family", "Century Gothic"); lblPropDescription.Style.Add("font-weight", "bold"); lblAddress.Style.Add("font-family", "Century Gothic"); lblAddress.Style.Add("font-weight", "bold"); lblPrice.Style.Add("font-family", "Century Gothic"); lblPrice.Style.Add("font-weight", "bold"); lblIntialdeposit.Style.Add("font-family", "Century Gothic"); lblIntialdeposit.Style.Add("font-weight", "bold"); lblLandMArk.Style.Add("font-family", "Century Gothic"); lblLandMArk.Style.Add("font-weight", "bold"); // Mapping the Property data with UI controls... lblPropname.Text = k.PropertyName; lblType.Text = "Type : " + k.PropertyType + " || "; lblPropOption.Text = "Option : " + k.PropertyOption + " || "; // lblPropDescription.Text = "Description : \t" + k.Description; lblAddress.Text = "Address : " + k.Address + " "; lblPrice.Text = "Price : " + (int)k.PriceRange + " || "; lblIntialdeposit.Text = "Intial Deposit : " + (int)k.InitialDeposit + " || "; lblLandMArk.Text = "LandMark : " + k.Landmark + " || "; // Appending All the UI Controls to stackpanel div.Controls.Add(new LiteralControl("<br/>")); div.Controls.Add(lblPropname); div.Controls.Add(new LiteralControl("<br/><br/>")); div.Controls.Add(img); div.Controls.Add(lblType); div.Controls.Add(lblPropOption); div.Controls.Add(lblPrice); div.Controls.Add(lblIntialdeposit); div.Controls.Add(lblLandMArk); div.Controls.Add(lblAddress); div.Controls.Add(lblPropDescription); //// label for type //div.Controls.Add(new Label() //{ // Text = "Type :" + k.PropertyType, // CssClass = "col-md-2 control-label" //}); //button.. string propertyId = k.PropertyId.ToString(); var btnAddcart = new Button { ID = "btnClick" + propertyId, Text = "Add To Cart", CssClass = "btn btn-info" }; btnAddcart.Click += (s, RoutedEventArgs) => { ConfirmCart(s, e, propertyId); }; // GetDataItem owner details.. var btnOwnerDetails = new LinkButton { Text = "Get Owner Details", CssClass = "btn btn-info" }; // button styles btnAddcart.Style.Add("font-family", "Century Gothic"); btnOwnerDetails.Style.Add("font-family", "Century Gothic"); btnOwnerDetails.Click += (s, RoutedEventArgs) => { GetContactDetails(s, e, propertyId); }; // Adding all the childs to div bodydiv.Controls.Add(div); bodydiv.Controls.Add(btnAddcart); bodydiv.Controls.Add(new LiteralControl(" ")); bodydiv.Controls.Add(btnOwnerDetails); // After adding all the childs.. bodydiv.Controls.Add(new LiteralControl("<br/><br/>")); } }