Click here to Skip to main content
15,887,683 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Display the page at the time of page refresh. Pin
Abhijit Jana21-Sep-09 19:56
professionalAbhijit Jana21-Sep-09 19:56 
GeneralRe: Display the page at the time of page refresh. Pin
yesu prakash21-Sep-09 20:17
yesu prakash21-Sep-09 20:17 
AnswerRe: Display the page at the time of page refresh. Pin
Abhishek Sur21-Sep-09 22:03
professionalAbhishek Sur21-Sep-09 22:03 
QuestionMS Petshop 4 on VS 2008 Pin
Member 457127021-Sep-09 18:35
Member 457127021-Sep-09 18:35 
QuestionA form for creating a one to many record in a db Pin
Quake2Player21-Sep-09 17:49
Quake2Player21-Sep-09 17:49 
AnswerRe: A form for creating a one to many record in a db Pin
Abhijit Jana21-Sep-09 18:55
professionalAbhijit Jana21-Sep-09 18:55 
GeneralRe: A form for creating a one to many record in a db Pin
Quake2Player22-Sep-09 6:37
Quake2Player22-Sep-09 6:37 
QuestionSystem.ArgumentNullException: Value cannot be null. [modified] Pin
kmsandeep21-Sep-09 13:38
kmsandeep21-Sep-09 13:38 
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

AnswerRe: System.ArgumentNullException: Value cannot be null. Pin
Expert Coming21-Sep-09 14:00
Expert Coming21-Sep-09 14:00 
GeneralRe: System.ArgumentNullException: Value cannot be null. Pin
kmsandeep22-Sep-09 13:36
kmsandeep22-Sep-09 13:36 
GeneralRe: System.ArgumentNullException: Value cannot be null. Pin
Ram Cronus28-Sep-09 9:41
Ram Cronus28-Sep-09 9:41 
QuestionInvalid attempt to call Read when reader is closed. Pin
kunal naik21-Sep-09 12:30
kunal naik21-Sep-09 12:30 
AnswerRe: Invalid attempt to call Read when reader is closed. Pin
kmsandeep21-Sep-09 13:46
kmsandeep21-Sep-09 13:46 
QuestionHow to Save the voice record file in the client system Using MCI in c# .net 2.0 web application Pin
bruze21-Sep-09 10:15
bruze21-Sep-09 10:15 
AnswerRe: How to Save the voice record file in the client system Using MCI in c# .net 2.0 web application Pin
Abhishek Sur21-Sep-09 11:10
professionalAbhishek Sur21-Sep-09 11:10 
GeneralRe: How to Save the voice record file in the client system Using MCI in c# .net 2.0 web application Pin
bruze21-Sep-09 11:23
bruze21-Sep-09 11:23 
GeneralRe: How to Save the voice record file in the client system Using MCI in c# .net 2.0 web application Pin
Abhishek Sur21-Sep-09 11:37
professionalAbhishek Sur21-Sep-09 11:37 
GeneralRe: How to Save the voice record file in the client system Using MCI in c# .net 2.0 web application Pin
bruze21-Sep-09 11:54
bruze21-Sep-09 11:54 
AnswerRe: How to Save the voice record file in the client system Using MCI in c# .net 2.0 web application [modified] Pin
rahul145510-Mar-10 18:48
rahul145510-Mar-10 18:48 
Questionthe style changed problem by alert message box Pin
Seraph_summer21-Sep-09 10:13
Seraph_summer21-Sep-09 10:13 
AnswerRe: the style changed problem by alert message box Pin
Abhishek Sur21-Sep-09 11:05
professionalAbhishek Sur21-Sep-09 11:05 
QuestionUsers and Cookies in ASP.NET MVC Pin
Quake2Player21-Sep-09 10:08
Quake2Player21-Sep-09 10:08 
AnswerRe: Users and Cookies in ASP.NET MVC Pin
Abhishek Sur21-Sep-09 11:02
professionalAbhishek Sur21-Sep-09 11:02 
GeneralRe: Users and Cookies in ASP.NET MVC Pin
Not Active21-Sep-09 11:10
mentorNot Active21-Sep-09 11:10 
AnswerRe: Users and Cookies in ASP.NET MVC Pin
Not Active21-Sep-09 11:08
mentorNot Active21-Sep-09 11:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.