creating new custom control error...

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
8/19/2009 11:39:58 AM
Gravatar
Total Posts 10

creating new user control error...

custom control throws an error

I am creating new user control under the controls folder in web project.

private void BindBlogsList()
{
using (IDataReader reader = Blog.GetLatestBlogs())
{
dlBloglist.DataSource = reader; // this line throws error
dlBloglist.DataBind();
}
dlBloglist.Visible = (dlBloglist.Items.Count > 0);
}

Error Message: Object reference not set to an instance of an object.

The data is there in the reader object even though the error throws

 

8/19/2009 12:20:28 PM
Gravatar
Total Posts 10

Re: creating new user control error...

I have tested for other few controls...

like OnlineMemberListControl.ascx ...

same error occurs ... please need help!

8/23/2009 11:44:00 AM
Gravatar
Total Posts 18439

Re: creating new custom control error...

It sounds like you are creating UserControls using inline code and then copying code from my usercontrols that do not use inline code.

A developer could set a breakpoint and find out which object is null. I suspect its because you have not declared the WebControls in your inline UserControl. You have to declare TextBoxes DataLists, DataGrids or any other control you want to reference in code.

When using the code behind model they get generated for you automatically in the .designer.cs file but in inline code you have to declare them yourself. Any experienced ASP.NET developer should know this.

I will say that your whole approach to getting my help has been pushy and trying to pressure me and I don't appreciate it one bit.

You first posts you asked about skins and UI customization I pointed you to a page that had the exact answers and you did not understand.

Your next question was about how to show the recent blog posts and I told you how to do it using a Feed Manager in conjunction with the blog, but you did not understand. So you start hacking on UserControls to solve it yourself which is this very thread.

All the while I'm seeing complaints on twitter and I was pretty sure it was you http://twitter.com/joinvivek since each complaint corresponded with your forum posts. Thats makes me not want to help you. It seems you only just created a twitter account so you could complain about things especially mojoPortal.

And finally you posted the same question in the IssueTracker on Codeplex and announced yourself with your true identity and the fact that you are an MVP in ASP.NET. This connected all the dots for sure. 

I don't appreciate it, you stressed me out for several days, distracted me from my own work and made me very angry. Some people in this world give and give freely of the the fruits of their labors and others just take and complain. mojoPortal is a labor of love for me but no-one here including me is under any obligation to ever answer forum posts. I don't work for you and the fact that I share my work with you does not obligate me in any way to care about your projects and the difficulties you are having. Any respponse I make is a kindness and if its repaid in unkindness like twitter complaining then you will get no further help.

Joe Audette

You must sign in to post in the forums. This thread is closed to new posts.