Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
K

kmsandeep

@kmsandeep
About
Posts
3
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • System.ArgumentNullException: Value cannot be null. [modified]
    K kmsandeep

    below is code protected void gotoCart(object sender, EventArgs e) { ImageButton btn = (ImageButton)sender; double Price = double.Parse(((Label)btn.Parent.FindControl("Price")).Text);//.Substring(8)); string ProductName = ((HyperLink)btn.Parent.FindControl("hlnkProductName")).Text; string ImagePath = ((System.Web.UI.WebControls.Image)btn.Parent.FindControl("imgProduct")).ImageUrl; string ProductID1 = ((HtmlInputHidden)btn.Parent.FindControl("hdnid")).Value; string ParentID = ((HtmlInputHidden)btn.Parent.FindControl("hdnParentID")).Value; int ProductID = Convert.ToInt32(ProductID1.Substring(1)); if (Profile.Cart == null) // here at this line it shows error { Profile.Cart = new shopping.ShoppingCart(); } Profile.Cart.Insert(ProductID, Price,0, 1, ProductName, ImagePath); Response.Redirect(ResolveUrl("~") + "Shopping_Cart/ShoppingCart.aspx"); }

    ASP.NET help design

  • Invalid attempt to call Read when reader is closed.
    K kmsandeep

    befor below line you must check dr is nothing While dr.Read()

    ASP.NET help

  • System.ArgumentNullException: Value cannot be null. [modified]
    K kmsandeep

    my project is running locally fine. But when i upload it shows below error [ArgumentNullException: Value cannot be null. Parameter name: type] System.Activator.CreateInstance(Type type, Boolean nonPublic) +7465206 System.Web.Profile.ProfileBase.CreateMyInstance(String username, Boolean isAuthenticated) +79 System.Web.Profile.ProfileBase.Create(String username, Boolean isAuthenticated) +231 System.Web.HttpContext.get_Profile() +107 ProductsAccordingCat.get_Profile() +49 ProductsAccordingCat.gotoCart(Object sender, EventArgs e) in ProductsAccordingCat.aspx.cs:696 System.Web.UI.ImageClickEventHandler.Invoke(Object sender, ImageClickEventArgs e) +0 System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs e) +108 System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument) +118 System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565 Please help me to solve this problem. below is code protected void gotoCart(object sender, EventArgs e) { ImageButton btn = (ImageButton)sender; double Price = double.Parse(((Label)btn.Parent.FindControl("Price")).Text);//.Substring(8)); string ProductName = ((HyperLink)btn.Parent.FindControl("hlnkProductName")).Text; string ImagePath = ((System.Web.UI.WebControls.Image)btn.Parent.FindControl("imgProduct")).ImageUrl; string ProductID1 = ((HtmlInputHidden)btn.Parent.FindControl("hdnid")).Value; string ParentID = ((HtmlInputHidden)btn.Parent.FindControl("hdnParentID")).Value; int ProductID = Convert.ToInt32(ProductID1.Substring(1)); if (Profile.Cart == null) // here at this line it shows error { Profile.Cart = new shopping.ShoppingCart(); } Profile.Cart.Insert(ProductID, Price,0, 1, ProductName, ImagePath); Response.Redirect(ResolveUrl("~") + "Shopping_Cart/ShoppingCart.aspx"); }

    modified on Tuesday, September 22, 2009 12:52 PM

    ASP.NET help design
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups