locked
Identified bugs and fixes for the ClubSite Starter kit RRS feed

  • Question

  • User-302016627 posted

    I thought it would be kinda cool, if we had a separate thread for user-identified bugs and fixes.

    It'll allow everybody to stay on the same page, and current without having to 're-invent the wheel'-per-newbie.

    Also bug-fixers can have a common area to analyse, compare, comment-on and discuss posted fixes, for a given bug... so that the best fix gets implemented by readers.

    Please try to post all future Bug Reports and fixes on this thread.

    If U have bookmarks of earlier bug-reports and fixes for the ClubSite Starter kit, kindly post the relevant links here (without reproducing the entire text)

    Thanks you.

    P.S. If any of U feel this thread wasn't necessary, pls. voice your concerns and offer alternate advice.

    Wednesday, March 8, 2006 10:02 AM

All replies

  • User-302016627 posted

    Ok ! here goes the 1st one...(nothingmajor, but it's fresh as of today)

    Bug# 1

    This one needs a Starter Kit setup with no photo-albums.

    Simulation:

    1. Delete all existing photo Albums from your Club website (or use a fresh new Starter Kit)

    2. Login in an Admin role and add a new Event

    3. Select a photo for this event from your hard-drive

    4. Because U have no Albums the Album combo-box is empty. Let it be so.

    5. When you try to save this Event, the application errors out.

     

    Fix # 1.1

    Open Photos_FormPicker.ascx    Go to Line 131

    Replace CInt( AlbumList2.SelectedValue)

    with   CInt( "0" & AlbumList2.SelectedValue)

    Save file and try to simulate again.

    Note: Only code has been depicted using Blue font.

    Wednesday, March 8, 2006 3:03 PM
  • User-302016627 posted

    Bug #2 (linked)

    Uploading Avatar photo error

    Last post 03-05-2006, 5:09 PM by mhare. 0 replies. on http://forums.asp.net/1217537/ShowPost.aspx

    Wednesday, March 8, 2006 3:08 PM
  • User-302016627 posted

    Bug #3

    How to simulate...

    Log-in as a member.

    Click on Membership.

    The members Registration details will bedisplayed.

    Try updating the Email field. It doesn't throw any error but Email emains unchanged, on subsequent Refreshes.

    All other details are updateable.

     

    Wednesday, March 22, 2006 10:33 AM
  • User1479750397 posted

    The problem is that the code checks for a difference but doesn't update the database.  Here's the fix in membership_details.aspx

     

        Protected Sub update_Click(ByVal sender As Object, ByVal e As System.EventArgs)
            Dim user As MembershipUser = Membership.GetUser()
            Dim da As New DataSetTableAdapters.MemberInfoTableAdapter
               
            If Email.Text <> user.Email Then
                user.Email = Email.Text
                Membership.UpdateUser(user)
            End If
            Try
                da.Update(CType(user.ProviderUserKey, Guid), Addr.Text, Phone.Text, fname.Text, lname.Text, CType

    (user.ProviderUserKey, Guid))
                ContactStatus.Text = "Details have been updated sucessfully."
                ContactStatus.ControlStyle.ForeColor = Drawing.Color.Black
            Catch ex As Exception
                ContactStatus.Text = "Error updating contact details: " & ex.Message
                ContactStatus.ControlStyle.ForeColor = Drawing.Color.Red
            End Try
        End Sub
     

    Wednesday, March 22, 2006 4:19 PM
  • User-1476513399 posted

    Nice catch !!

    <>

    Thursday, March 23, 2006 12:41 AM
  • User380413204 posted

    This is a great idea.

    Could a moderator make this thread sticky or how you call it?

    Perhaps it could sit just below that welcome message?

    Lex

    Thursday, March 23, 2006 3:03 PM
  • User413695545 posted
    The change to membership_details.aspx did not work for me.
    All I added was the line
        Membership.UpdateUser(user)
    Any other ideas why the data edits are not being made? All other pages seem to work.

    Thanks,
    Chavak

    Saturday, March 25, 2006 3:25 PM
  • User1275632693 posted

    Hey folks, if we are going to Maintain a list of Bugs and Fixes. Might I suggest we keep a Message which can be updated daily.

    The main reason being it would be easy to identify if any given bug has been identified and cataloged, perhaps we could even prioritize them and address as a group.

    So who will step up and take on the task of maintaining the list? as a Top Level Message in this thread.

     

    Sunday, March 26, 2006 11:05 PM
  • User-1320011621 posted

    line 125 of ImageHandling.cs

    changed from :

    scale = iOriginal.Width / maxwidth;

    to

    scale = (double)iOriginal.Width / (double)maxwidth;

    This otherwise would use integer division and produce a slightly incorrect scale. Some of my images were coming out a bit skewed and looked funny, so debugged this.

    Tuesday, March 28, 2006 8:49 AM
  • User-214118200 posted

    I think the buglist should include the solutions for install/deployment/configuration problems, since some of these are real show-stoppers.  I found this one to be a godsend: http://forums.asp.net/thread/1186510.aspx "Club Site Starter Kit on CrystalTech"

    Also, is there a way to make the buglist thread sticky, so it shows at the top of the forum message list?

     

    Wednesday, March 29, 2006 11:00 AM
  • User39490543 posted
    Also, is there a way to make the buglist thread sticky, so it shows at the top of the forum message list? 

    Sure, a moderator can do this.  This is a good suggestion and this thread is now sticky.
    Wednesday, March 29, 2006 11:10 AM
  • User-214118200 posted

    Thanks very much. 

    Now that this thread is sticky, the top-level message displays as "locked".

    I cannot post a reply to that message, in order to add a bug/fix to the list at the level just below the top level .  Perhaps this a limitation of the forum software, in which case some strategy is needed to get all the added fixes posted at the same level for easy browsing.

       

     

    Wednesday, March 29, 2006 12:17 PM
  • User39490543 posted
    sorry about that, it should now be unlocked
    Wednesday, March 29, 2006 4:29 PM
  • Wednesday, March 29, 2006 6:01 PM
  • User-214118200 posted

    Thanks. Regarding my previous comments, and to keep things organized:  maybe 3 stickys would be best to make things easy to find:

    1) Buglist

    2) Deployment, Installation, & Configuration info, problem fixes, guides, & walkthroughs

    3) Extensions / Added functionality / Improvements

     

     

    Wednesday, March 29, 2006 6:07 PM
  • User-1476513399 posted

    Thanks. Regarding my previous comments, and to keep things organized:  maybe 3 stickys would be best to make things easy to find:

    1) Buglist

    2) Deployment, Installation, & Configuration info, problem fixes, guides, & walkthroughs

    3) Extensions / Added functionality / Improvements

    Excellent Idea!

    ***

    Wednesday, March 29, 2006 6:55 PM
  • User1275632693 posted

    Hey,

    Does anybody have the Issue Tracking Kit up and running? That would be a fantastic way to integrate some of the Starter Kits.

    We could use the Issue Starter Kit to keep track of the issues we find on the Club Starter Kit.

    I use Brinkerster as a free hosting site, I wonder if it would work over there, or perhaps I will have to simply open a different Port # on my server here and run the Issue Starter kit there.

     

    Thursday, March 30, 2006 7:54 PM
  • User-1476513399 posted

    Hey,

    Does anybody have the Issue Tracking Kit up and running? That would be a fantastic way to integrate some of the Starter Kits.

    We could use the Issue Starter Kit to keep track of the issues we find on the Club Starter Kit.

    I use Brinkerster as a free hosting site, I wonder if it would work over there, or perhaps I will have to simply open a different Port # on my server here and run the Issue Starter kit there.

    I will check the ITK out over the weekend to see if I can get it running without a lot of trouble.

    joe

    Friday, March 31, 2006 5:45 PM
  • User-1476513399 posted

    Hey,

    Does anybody have the Issue Tracking Kit up and running? That would be a fantastic way to integrate some of the Starter Kits.

    We could use the Issue Starter Kit to keep track of the issues we find on the Club Starter Kit.

    I use Brinkerster as a free hosting site, I wonder if it would work over there, or perhaps I will have to simply open a different Port # on my server here and run the Issue Starter kit there.

    Angelo ...

    I installed the ITK ... and it seems to be 'working'.  Now, I need to see what 'it can do' ! I installed the Access version because I have been working daily with Access for 14 years and am intimately familiar with it.

    Looking at the ITK Forum, there seem a lot of 'issues' - kind of ironic.  So, I need to assess the ITK ... find the issues ... and really, see it I have time to really get it up an running to a useful state.  The ITK in itself is no doubt a project in itself! I have sites where I can host it, you hosting is not a problem per se.

    I will get back to you in a bit ...

    joe

    Monday, April 3, 2006 5:44 PM
  • User1275632693 posted

    Hi Joe,

    You are doing great, I really enjoy seeing some of us go above and beyond the usual casual "How Do I?" type of participation.

    We may well set an example for alot of our counterparts in the ASP.NET world.

     

    Monday, April 3, 2006 8:55 PM
  • User-1476513399 posted

    Hi Joe,

    You are doing great, I really enjoy seeing some of us go above and beyond the usual casual "How Do I?" type of participation.

    We may well set an example for alot of our counterparts in the ASP.NET world.

    Angelo ... Lets take a survey and find out how many people would actually participate in the Bug Tracker using the Issue Tracker Kit.

    joe

    Monday, April 3, 2006 9:59 PM
  • User1275632693 posted

    Joe,

    Well it certainly seems that you did not get all that many replies. You know I would certainly use it.

     

    Saturday, April 8, 2006 8:14 AM
  • User-1476513399 posted

    Joe,

    Well it certainly seems that you did not get all that many replies. You know I would certainly use it.

    Well, I guess we can give it another week.  To make the ITK 'useable' would require a fair amount of work.

    joe

    Saturday, April 8, 2006 2:08 PM
  • User-1093854538 posted
    Do you want these Publicly or privately??? I vote YES.  [:D]
    Saturday, April 8, 2006 5:53 PM
  • User1275632693 posted

    Joe,

    I think a much watered down solution with a Simple Table or Two and a Gridview with Edit/Update capabilites would be better.

    Make a Table... PTHEADER -  Problem Ticket Header

                                                      Ticket Number  
                                                      Ticket Status
                                                      Owner 
                                                      Description

                             PTDETAIL -  Problem Ticket Detail

                                                    Ticket Number
                                                    Ticket Entry 
                                                    Ticket Entry Details -  VarChard (Multi-Line Text Field)

                      Cardinality would be 1:N

                       1 PTHEADER Record for Many PTDETAIL , so probably the Primary Key on the PTDETAIL would be TicketNumber,TicketEntry

     This would be an extremely simplified and easy to create Gridview master with DetailView.


    Let me know what you think, I do believe I have already implemented a Grid with Master and Detail in my version of the Personal Site Starter Kit.

                                    
     

                                                   

     

    Saturday, April 8, 2006 6:14 PM
  • User549874743 posted
    I would be interested in using it too.


    Rogoflap
    Sunday, April 9, 2006 8:09 AM
  • User1275632693 posted

    We are putting together a simple tool to manage this for now, should be up and running fairly soon.

     

    Thursday, April 13, 2006 3:50 PM
  • User-1090875947 posted
    Thanks for this, it worked.
    Friday, April 14, 2006 2:30 PM
  • User-1090875947 posted

    The change I made to Members_details.aspx to fix the problem with updating members details as suggested on the forum does not seem to work on my site either.

    I added the line:

    Membership.UpdateUser(user)

    I also find it impossible to upload an Avatar Image through this page.

    If anyone has ideas about how to fix this I'm very interested, I appreciate everyone's efforts.

    Thanks to all.

    Rick (newbie)

     

    Friday, April 14, 2006 3:12 PM
  • User654902800 posted

    Hey Woofmeister, this is a long shot, but are you logged in as an admin that you created via the asp.net configuration (rather than a user that was created through the club site create user wizard)?

    If you create a user via the config tool, then the site's database doesn't know about that user, has no entry for them, and thus can't update them. Try creating a new user via the membership registration thingy, then use the cofig tool to make them an admin.

    Friday, April 14, 2006 7:06 PM
  • User-1090875947 posted

    Good Call.

    You hit the nail on the head.

    I was logged on in the manner you described. I took your suggestion and it worked. I'm grateful. Thanks MrLunch. and to all others who took interest in my plight.

    Keep up the good work.

    Rick(Newbie)

    Saturday, April 15, 2006 11:50 AM
  • User-302016627 posted

    Bug# 5

    How to simulate:

    Log in as the admin of the Club Website.

    Click on Events

    Click on Add new Event

    Do not add/modify anything on the Ad new Event page, and directly hit 'Cancel'

    Application errors out

     

    Fix 5.1

    In file Events_view.aspx scroll to the code for Get/Set of Property EventId

    Before every CInt(id) operation id is being checked via If Not id Is Nothing Then

    Replace this check by If Not id Is Nothing And IsNumeric(Id) Then

    in two places within this property block..

    Save changes and try simulating again.

    As always... a better, more elegant fix is always welcome !

    Thanks.

    Monday, April 17, 2006 2:14 PM
  • User322206306 posted

    Thanks Bugslayer! tried it worked. I'm new to this,  but thanks to contributors like yourself  I'm learning and getting ever closer to being able to lend some input of my own. I noticed after implementing your fix that I landed at /Events_view.aspx?EventID= which is great except my links to previous and next don't work. Which is not surprising, I'm having the same problem with previous and next location links, I'm just started working on it with little success but I'll keep pluggin away somethings gotta give.

    Keep on posting! Dravend

    Monday, April 17, 2006 8:22 PM
  • User-302016627 posted

    Hi Dravend,

    Good catch dude ! Thanx for the Input.

    As U reported, after hitting Cancel,  the page indeed landed at List View of events with /Events_view.aspx?EventID= (which looks so lame and abrupt) in the IE address bar. But the page displayed the 1st event, and surprisingly I was able to navigate to NEXT events (not previous events, as there were none, although for some reason the link remained enabled the 1st time).

    Overall how many Events have U created in your App? Just trying to simulate your scenario.

    Thanx

    Tuesday, April 18, 2006 10:37 AM
  • User322206306 posted

    Hey Bugslayer, I have 3 events all were pending. 1 April, 1 May, 1 June. Same goes with the locations list as they're tied to the three different events. I'll create some previous events and see what happens.

    Thanks, Dravend

    Tuesday, April 18, 2006 1:12 PM
  • User742541801 posted

    Locations_list.aspx has incorrect event wireup. and a bad title.

    The original title in my version of the file was "News Items".  This can be fixed at the top of the page with this:

    <%@ Page Language="C#" MasterPageFile="~/Default.master" Title="Locations" Trace="false" %>

    Be sure to use VB as the language if that is what you have.   The second problem, with event wireup, is associated with the next/previous buttons. I believe the original code, almost at the bottom of the file, is like so:

                        <Club:PageNumberer ID="pn2" runat="server" DisplayedPages="7"

                            CssClass="PageNumbers"

                            OnSelectedPageChanged="pn1_SelectedPageChanged" />

    And what you reall want is for the pn2_SelectedPageChanged method to be tickled, like so:

                        <Club:PageNumberer ID="pn2" runat="server" DisplayedPages="7"

                            CssClass="PageNumbers"

                            OnSelectedPageChanged="pn2_SelectedPageChanged" />

    Of course, for the previous PageNumberer, the one with id="pn1", you want pn1_SelectedPageChanged.  Looks like a simple copy/paste error.

    -Cheeso

      

    Tuesday, April 18, 2006 11:43 PM
  • User1275632693 posted

    I totally rewrote the News/Announcements Paging code, just did not seem to work properly and sometimes it is better to just redo something as opposed to deconstruct someone else's spaghetti.

    I have not tried creating more than 10 events for the List all events to see if the Paging code works, I suspect you will encounter the same problems.

     

     

    Wednesday, April 19, 2006 10:00 AM
  • User742541801 posted

    Angelo, maybe you are talking about News_View.aspx?  This is the page where you view a single news item and you can click next or previous to navigate among them all.   It is different than News_list.aspx (or the similar Locations_List.aspx) that I mentioned above.  The *_list.aspx pages just list a "page worth" of news or events or locations.  And you can go to the next page, etc.  The problem I found there was pretty simple.  The problems I found in *_View.aspx were more subtle. 

    For News_View.aspx, I too noticed that the next/previous links were just not working.  a Next or Prev link would be active when it shouldn't be (eg, a previous link was active for the very first news item, or a next link for the very last).  Clicking on these invalid links would refresh the page, display the same (first or last) news item (or location, or event), but the link would then be (properly) not enabled.  Anyway it was broken, and the behavior was confusing. 

    I tried tweaking it a little bit, but as you say, sometimes it is better to just redo.  So I fixed the next/previous logic for News_View.aspx and Event_View.aspx, and re-factored the result.  I tried it with more than 3 pages worth of news and events and it is working nicely.  Cleaner, too.   As I said, this problem and fix is totally independent of the next/prev problem that I found in Locations_List.aspx, which was apparently just a sloppy cut-n-paste. 

    I don't know if this (next/prev broken in News_View.aspx)  is a previously-mentioned problem or not, but anyway, enclosed below is my code for a corrected News_View.aspx.  It employs a  private class for tracking the previous and next items of an article.  To me it is cleaner and clearer.  There are a couple other, independent changes in this code you should be aware of, if you want to use it: 

    (1)  I added a little method (CanEdit) to turn the Edit button on or off, depending on the identity of the user.  Only the original poster can update a news item.  This requires a change to the DB Schema for the Announcements/News table; I added a postedBy varchar field, and I retrieve it in the query.  If you don't want that feature, then just remove mention of the CanEdit() in code and in the markup, remove the retrieval of the postedBy column in the query, and remove the text that says "last posted by" in the panel. 

    (2) There is a call to a new method GetStatusMessage() which just references a Session variable and returns its contents.  I inserted that to track "silent failures" that the club site sometimes exhibits (eg, doesn't update the DB, but doesn't tell you).  You can just yank that part, or implement your own. 

    (3) I changed the name of the table from announcements to News.  This is gratuitous.  To undo that change, just search/replace news for announcements in all the queries.

    Those are the only "other" changes I can recall making in this aspx.  Anyway, here is the new code to fix the paging. (sorry no VB)

     

    <%@ Page Language="C#" MasterPageFile="~/Default.master" Title="Untitled Page"  Trace="false"%>

     

    <%@ Register TagPrefix="Club" Namespace="ClubSite" %>

    <%@ Register TagPrefix="Club" TagName="LoginBanner" Src="LoginBanner.ascx" %>

    <%@ Register TagPrefix="Club" TagName="ImageThumbnail" Src="ImageThumbnail.ascx" %>

     

    <%@ Import Namespace="System.Data" %>

    <%@ Import Namespace="System.Data.SqlClient" %>

     

    <script runat="server">

     

        private class NextPrev

        {

            public int nextArticleId;

            public int prevArticleId;

            public NextPrev() { nextArticleId = INVALIDID; prevArticleId = INVALIDID; }

        }

     

        private NextPrev pointers;

        const int INVALIDID = -1;

     

        protected void Page_Load(object sender, System.EventArgs e)

        {

            if (!IsPostBack)

            {

                Trace.Write("Not Post Back");

                InitDatasources();

                EnableLinksIntelligently();

            }

        }

     

        protected void FormView1_DataBound(object sender, System.EventArgs e)

        {

            DataRowView view = (DataRowView)(FormView1.DataItem);

            if (view == null) Response.Redirect("Default.aspx");

            object o = view["staticURL"];

            if (o != null && o !=DBNull.Value)

            {

                string staticurl = (string)o;

                if (staticurl != "")

                {

                    Response.Redirect(staticurl);

                }

            }

        }

     

        protected void nextButton_Click(object sender, System.EventArgs e)

        {

            NextPrev np1 = GetNextPrev(ArticleID);

            if (np1.nextArticleId != INVALIDID)

            {

                ArticleID = np1.nextArticleId;

                InitDatasources();

            }

            EnableLinksIntelligently();

        }

     

        protected void prevButton_Click(object sender, System.EventArgs e)

        {

            Trace.Write("Previous");

     

            NextPrev np1= GetNextPrev(ArticleID);

            if (np1.prevArticleId != INVALIDID)

            {

                ArticleID = np1.prevArticleId;

                InitDatasources();

            }

            EnableLinksIntelligently();

        }

     

        void InitDatasources()

        {

            PhotoPanel.Visible = true;

            SqlDataSource1.SelectParameters["id"].DefaultValue = System.Convert.ToString(ArticleID);

            SqlDataSource2.SelectParameters["id"].DefaultValue = System.Convert.ToString(ArticleID);

        }

     

        void EnableLinksIntelligently()

        {

            pointers = GetNextPrev(ArticleID);

            Trace.Write(String.Format("New links: curr={0} next={1} prev={2}", ArticleID, pointers.nextArticleId, pointers.prevArticleId));

            LinkButton1.Enabled = //(pointers.nextArticleId != INVALIDID);

            LinkButton3.Enabled = (pointers.nextArticleId != INVALIDID);

            LinkButton2.Enabled = //(pointers.prevArticleId != INVALIDID);

            LinkButton4.Enabled = (pointers.prevArticleId != INVALIDID);

        }

     

        protected bool CanEdit(string postedBy)

        {

            MembershipUser user = Membership.GetUser();

            return (User.IsInRole("Administrators") && (postedBy == user.UserName));

        }

     

        int ArticleID

        {

            get

            {

                int m_articleID;

                object id = ViewState["ArticleId"];

                if (id != null)

                {

                    m_articleID = System.Convert.ToInt32(id);

                }

                else

                {

                    id = Request.QueryString["ArticleId"];

                    if (id != null)

                    {

                        m_articleID = System.Convert.ToInt32(id);

                    }

                    else

                    {

                        m_articleID = 1;

                    }

                    ViewState["ArticleId"] = m_articleID;

                }

                return m_articleID;

            }

            set

            {

                ViewState["ArticleId"] = value;

            }

        }

     

        NextPrev GetNextPrev (int ArticleID)

        {

            NextPrev np = new NextPrev();

            try

            {

                SqlConnection connection = new SqlConnection(ConfigurationManager.ConnectionStrings["ClubSiteDB"].ConnectionString);

                SqlCommand command = new SqlCommand("NextPrevAnnouncement", connection);

     

                SqlParameter param0 = new SqlParameter("@id", ArticleID);

                SqlParameter param1 = new SqlParameter("@previd", INVALIDID);

                SqlParameter param2 = new SqlParameter("@nextid", INVALIDID);

     

                param1.Direction = ParameterDirection.InputOutput;

                param2.Direction = ParameterDirection.InputOutput;

     

                command.Parameters.Add(param0);

                command.Parameters.Add(param1);

                command.Parameters.Add(param2);

     

                command.CommandType = CommandType.StoredProcedure;

                connection.Open();

                command.ExecuteNonQuery();

                if (param1.Value != null && param1.Value != DBNull.Value)

                {

                    np.prevArticleId = Convert.ToInt32(param1.Value);

                }

                else

                {

                    np.prevArticleId = INVALIDID;

                }

                if (param2.Value != null && param2.Value != DBNull.Value)

                {

                    np.nextArticleId= Convert.ToInt32(param2.Value);

                }

                else

                {

                    np.nextArticleId = INVALIDID;

                }

                connection.Close();

            }

            catch (Exception e1)

            {

                Trace.Write(String.Format("Exception while getting next/prev news: {0}", e1.Message));

                np = new NextPrev();

            }

            return np;

        }

     

        protected void SqlDataSource2_Selected(object sender, System.Web.UI.WebControls.SqlDataSourceStatusEventArgs e)

        {

            PhotoPanel.Visible = (e.AffectedRows != 0);

        }

    </script>

     

    <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">

        <div id="body">

            <Club:LoginBanner ID="LoginBanner1" runat="server" />

            <!--

     

            Left column

     

            -->

            <div id="columnleft">

                <a name="content_start" id="content_start"></a>

                <div class="leftblock">

                    <h2>

                        News </h2>

                    <p>

                    Here you'll find news items the club  

                    finds noteworthy.<br />

     

                                <%= SharedRoutines.GetStatusMessage() %>

                                </p>

                </div>

                <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:ClubsiteDB %>"

                    SelectCommand="SELECT images.id, images.album, images.title FROM images, News WHERE images.album=News.albumid AND News.id=@id"

                    OnSelected="SqlDataSource2_Selected">

                    <SelectParameters>

                        <asp:Parameter Type="Int32" DefaultValue="1" Name="id"></asp:Parameter>

                    </SelectParameters>

                </asp:SqlDataSource>

                <asp:Panel ID="PhotoPanel" runat="server" CssClass="leftblock">

                    <h2>

                        Associated Album photos</h2>

                    <asp:DataList ID="DataList2" runat="server" DataSourceID="SqlDataSource2" DataKeyField="id"

                        RepeatColumns="2" CellSpacing="2" SelectedIndex="0" ItemStyle-CssClass="unselected">

                        <ItemTemplate>

                            <a href='photoalbum_contents.aspx?Albumid=<%#Eval("album") %>'>

                                <asp:Image ID="Image1" ImageUrl='<%# "imagefetch.ashx?size=1&imageid=" + Convert.ToString(Eval("id")) %>'

                                    runat="server" /><br />

                                <asp:Label Text='<%# Eval("title") %>' runat="server" ID="titleLabel" />

                            </a>

                        </ItemTemplate>

                    </asp:DataList>

                </asp:Panel>

            </div>

            <!--

     

            Right column

     

            -->

            <div id="columnright">

                <div class="rightblock">

                    <a href="news_list.aspx">News Article List</a></div>

                <div class="rightblock">

                    <div class="nextlink">

                        <asp:LinkButton ID="LinkButton1" runat="server" OnClick="nextButton_Click">Next Article &raquo;</asp:LinkButton>

                    </div>

                    <asp:LinkButton ID="LinkButton2" runat="server" OnClick="prevButton_Click">&laquo; Previous article</asp:LinkButton>

                    <div class="dashedline">

                    </div>

                    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ClubSiteDB %>"

                        SelectCommand="SELECT id, itemdate, title, description, photo, albumid, staticURL, postedBy FROM News WHERE (id = @id)">

                        <SelectParameters>

                            <asp:Parameter Type="Int32" DefaultValue="1" Name="id"></asp:Parameter>

                        </SelectParameters>

                    </asp:SqlDataSource>

                    <asp:FormView ID="FormView1" runat="server" DataSourceID="SqlDataSource1" DataKeyNames="id"

                        Width="444px" OnDataBound="FormView1_DataBound">

                        <ItemTemplate>

                            <h2>

                                <asp:Label Text='<%# Eval("title") %>' runat="server" ID="titleLabel" />

                            </h2>

                            <div class="itemdetails">

                                <p>

                                    <asp:Label Text='<%# Eval("itemdate","{0:D}") %>' runat="server" ID="itemdateLabel" />

                                </p>

                            </div>

                            <Club:ImageThumbnail ID="thumb1" runat="server" ImageSize="large" PhotoID='<%# Eval("photo") %>' />

                            <p>

                                <asp:Label Text='<%# Eval("description") %>' runat="server" ID="descriptionLabel" />

                            </p>

                            <asp:Panel ID="panel3" runat="server" Visible='<%# Eval("postedBy").ToString()!="" %>'>

                                <p>

                                (last updated by

                                    <asp:Label ID="postedByLabel" runat="server" Text='<%# SharedRoutines.truncate(Eval("postedBy").ToString()) %>' />)

                                </p>

                            </asp:Panel>

                            <asp:Panel runat="server" ID="panel1" CssClass="actionbuttons" Visible='<%# CanEdit(Eval("postedBy").ToString()) %>'>

                                <Club:RolloverLink ID="editbtn" runat="server" Text="Edit Article" NavigateURL='<%# "news_edit.aspx?ArticleID=" + Convert.ToString( ArticleID )%>' />

                            </asp:Panel>

                        </ItemTemplate>

                    </asp:FormView>

                    <div class="dashedline">

                    </div>

                    <div class="nextlink">

                        <asp:LinkButton ID="LinkButton3" runat="server" OnClick="nextButton_Click">Next Article &raquo;</asp:LinkButton>

                    </div>

                    <asp:LinkButton ID="LinkButton4" runat="server" OnClick="prevButton_Click">&laquo; Previous Article</asp:LinkButton>

                </div>

            </div>

            <div class="clear2column">

            </div>

        </div>

    </asp:Content>

     

    Wednesday, April 19, 2006 11:00 AM
  • User-302016627 posted

    Excellent work cheeso ![8-|]

    Thanks a bunch, for sharing your findings and fixes.[:D]

    By the power vested in me by the Senate [;)] , I hereby declare your reported bug and the associated fix as Bug # 6 & Fix 6.1 respectively.

    Keep 'em coming dude... guns blazing !!!

     

     

    Thursday, April 20, 2006 10:39 AM
  • User1275632693 posted

    Hi, actually I was refering the the news_list.aspx

    http://67.164.255.166:8029/news_list.aspx 

    I found that the Paging was not working once there was more than 10 news(announcements) in the db.

    Here is the fix I implemented after reviewing several examples and tutorials available out on the web.

    This is the News_List.aspx Page: 

    <%@ Page Language="VB" MasterPageFile="~/Default.master" AutoEventWireup="false" CodeFile="News_List.aspx.vb" Inherits="News_List" Title="News Articles" %>
    <%@ Register TagPrefix="Club" Namespace="ClubSite" %>
    <%@ Register TagPrefix="Club" TagName="LoginBanner" Src="LoginBanner.ascx" %>
    <%@ Register TagPrefix="Club" TagName="ImageThumbnail" Src="ImageThumbnail.ascx" %>

    <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
     <div id="body">
            <Club:LoginBanner ID="LoginBanner1" runat="server" />
            <!--
            Left column
            -->
            <div id="columnleft">
                <a name="content_start" id="content_start"></a>
                <div class="leftblock">
                    <h2>
                        News Articles</h2>
                    <p>
                        Keep current on news and events for Check Raise Inc.
                        Recaps of our exciting events and tournaments are regularly posted here and any major events/site upgrades will be reported here as well.    
                    </p>
                </div>
            </div>
            <!--
            Right column
            -->
             <div id="columnright">
                <div class="rightblock">
                    <asp:panel ID=panel1 runat=server cssclass="actionbuttons">
                        <Club:RolloverLink ID="RemoveBtn" runat="server" Text="Add new Article" NavigateURL="News_Edit.aspx?Action=New" />
                    </asp:panel>
                    <div class="dashedline">
                    </div>
                    <!-- begin news item -->
                    <asp:Repeater ID="NewsRepeater" runat="server" >
                        <ItemTemplate>
                            <div class="listitem">
                                <div class="thumbnail">
                                    <a href='<%# "News_View.aspx?Articleid=" &Cstr( Eval("ID"))%>'>
                                        <Club:ImageThumbnail ID="ImageThumbnail1" runat="server" PhotoID='<%# Eval("photo") %>'
                                            NoPhotoImg="images/news.jpg" />
                                    </a>
                                </div>
                                <asp:panel ID=panel2 runat=server Visible='<%#IsAdmin %>'>
                                    <Club:RolloverLink ID="EditBtn" runat="server" Text="Edit" NavigateURL='<%# "News_Edit.aspx?Action=Edit&ArticleID=" & Cstr( Eval("ID")) %>' />
                                    <Club:RolloverLink ID="RemoveBtn" runat="server" Text="Remove" NavigateURL='<%# "News_Edit.aspx?Action=Remove&ArticleID=" & Cstr( Eval("ID")) %>' />
                                </asp:panel>
                                <h3>
                                    <asp:Label ID="itemdateLabel" runat="server" Text='<%# Eval("itemdate","{0:d}") %>' />
                                    &nbsp;&nbsp;&nbsp;&nbsp; <a href='<%# "news_view.aspx?articleid=" &Cstr( Eval("ID"))%>'>
                                        <asp:Label ID="titleLabel" runat="server" Text='<%# Eval("title") %>' />
                                    </a>
                                </h3>
                                <p>
                                    <asp:Label ID="descriptionLabel" runat="server" Text='<%# truncate(CStr(Eval("description"))) %>' />
                                    <a href='<%# "news_view.aspx?articleid=" &Cstr( Eval("ID"))%>'>read more &raquo;</a></p>
                                <div class="clearlist">
                                </div>
                            </div>
                        </ItemTemplate>
                    </asp:Repeater>
                    <div class="dashedline"></div>
                    <div class="newscrumbs">
                        Page: <asp:PlaceHolder id="PageButtons" runat="server"/>
                    </div>
                </div>
            </div>
            <div class="clear2column"></div>
        </div>

    </asp:Content>

    Here is the VB code for the Code Behind File.

    Imports System
    Imports System.Configuration
    Imports System.Data
    Imports System.Data.Common
    Imports System.Data.SqlClient
    Imports System.Data.OleDb
    Imports System.Web.UI
    Imports System.Web.UI.WebControls
    Imports System.Web.UI.HtmlControls


    Partial Class News_List

        Inherits System.Web.UI.Page

        Dim DBConnection As SqlConnection
        Dim DBCommand As SqlCommand
        Dim DBReader As SqlDataReader
        Dim SQLString As String
        Dim PageSize As Integer = 4
        Public IsAdmin As Boolean

     

        Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

            IsAdmin = User.IsInRole("Administrators")
            panel1.Visible = IsAdmin

            If Not Page.IsPostBack Then
                Fill()
            End If

            '-- Load array NewsIdList() with item numbers
            Dim NewsIdList = New ArrayList()
            DBConnection = New SqlConnection(ConfigurationManager.ConnectionStrings("ClubSiteDB").ConnectionString)
            SQLString = "SELECT id, itemdate FROM Announcements " & _
                        "ORDER BY id DESC, itemdate DESC"
            DBConnection.Open()
            DBCommand = New SqlCommand(SQLString, DBConnection)
            DBReader = DBCommand.ExecuteReader()
            While DBReader.Read()
                NewsIdList.Add(DBReader("id"))
            End While
            DBReader.Close()
            DBConnection.Close()
            NewsIdList.TrimToSize()

            '-- Create Paging Buttons
            Dim StartIndex As Integer
            Dim EndIndex As Integer
            Dim StartKey As String
            Dim EndKey As String
            Dim StartDate As DateTime

            Dim i As Integer

            StartIndex = 0
            For i = 1 To Math.Ceiling(NewsIdList.Count / PageSize)

                '-- Determine starting and ending array indexes
                EndIndex = StartIndex + PageSize - 1
                If EndIndex > NewsIdList.Count - 1 Then
                    EndIndex = NewsIdList.Count - 1
                End If

                '-- Assign starting and ending item numbers
                StartKey = NewsIdList(StartIndex)
                EndKey = NewsIdList(EndIndex)

                '-- Create a button and assign to placeholder
                Dim PageButton As Button
                PageButton = New Button()
                PageButton.Text = i
                PageButton.ID = "P" & i
                PageButton.CommandName = StartKey & "|" & EndKey
                PageButton.Style("width") = "20px"
                PageButton.Style("background-color") = "#F0F0F0"
                AddHandler PageButton.Command, AddressOf DisplayRepeater
                PageButtons.Controls.Add(PageButton)

                StartIndex += PageSize

            Next

            If Not Page.IsPostBack Then
                Dim FirstButton As Button
                FirstButton = CType(PageButtons.FindControl("P1"), Button)
                FirstButton.Style("background-color") = "#990000"
                FirstButton.Style("color") = "#FFFFFF"
            End If


        End Sub

            Sub Fill()

            Dim DBConnection As New SqlConnection(ConfigurationManager.ConnectionStrings("ClubSiteDB").ConnectionString)
            SQLString = "SELECT Top " & PageSize & _
                        " id, itemdate, title, description, photo FROM Announcements " & _
                        "ORDER BY itemdate DESC, id DESC"
            DBConnection.Open()
            DBCommand = New SqlCommand(SQLString, DBConnection)
            DBReader = DBCommand.ExecuteReader()
            NewsRepeater.DataSource = DBReader
            NewsRepeater.DataBind()
            DBReader.Close()
            DBConnection.Close()

        End Sub

        Sub DisplayRepeater(ByVal Src As Object, ByVal Args As CommandEventArgs)

            Dim Keys() As String
            Keys = Split(Args.CommandName, "|")

            '-- Bind the Repeater

            DBConnection = New SqlConnection(ConfigurationManager.ConnectionStrings("ClubSiteDB").ConnectionString)
            DBConnection.Open()
            SQLString = "SELECT id, itemdate, title, description, photo FROM Announcements WHERE " & _
              "id >= '" & Keys(1) & "' AND " & _
              "id <= '" & Keys(0) & "' " & _
              "ORDER BY id DESC, itemdate DESC"
            DBCommand = New SqlCommand(SQLString, DBConnection)
            DBReader = DBCommand.ExecuteReader()
            NewsRepeater.DataSource = DBReader
            NewsRepeater.DataBind()
            DBReader.Close()
            DBConnection.Close()

            '-- Highlight clicked button
            Dim Item As Button
            Dim ThisButton As Button
            For Each Item In PageButtons.Controls
                ThisButton = CType(Item, Button)
                ThisButton.Style("background-color") = "#F0F0F0"
                ThisButton.Style("color") = "#000000"
            Next
            ThisButton = CType(PageButtons.FindControl(Src.id), Button)
            ThisButton.Style("background-color") = "#990000"
            ThisButton.Style("color") = "#FFFFFF"

        End Sub

    End Class

     

    You can download this at aspsksolutions.com, of course I posted it here as well.


     

    Thursday, April 20, 2006 2:00 PM
  • User-302016627 posted

    I think a much watered down solution with a Simple Table or Two and a Gridview with Edit/Update capabilites would be better.

    Make a Table... PTHEADER -  Problem Ticket Header

                             PTDETAIL -  Problem Ticket Detail
                       1 PTHEADER Record for Many PTDETAIL , so probably the Primary Key on the PTDETAIL would be TicketNumber,TicketEntry

     This would be an extremely simplified and easy to create Gridview master with DetailView.

    Let me know what you think, I do believe I have already implemented a Grid with Master and Detail in my version of the Personal Site Starter Kit.

    Hi,

    I hope U guys have seen, evaluated and thought about BugTracker.NET [:-*]

    If not pls take a look gere http://sourceforge.net/projects/btnet/

    I quote "A web-based bug/issue tracker written using ASP.NET and C#. Requires SQL Server or MSDE. Easy to install and learn how to use, but there's power if you need it. Probably has all the features you want. Nice integration with email."

    ASP.NET, C#, SQL !!! extending it should be a breeze...[8-|]

    It's supposedly Production/Stable &  GNU General Public License (GPL) open source so any enhancements /upgrades (along with your reputation) will effectively reach a wider audience (current/future downloaders) as the market-branding already exists. [cool]

    Think of it as another Strater Kit !!![;)]

    Caveat: BugTracker.NET is just my uninformed suggestion. Not responsible for any future outcome Good or Bad, including acts of Nature.[Angel]

    <!-- google_ad_section_end -->

     

    Friday, May 5, 2006 10:29 AM
  • User1275632693 posted

    Hi,

    I will check it out but I do have something that is nearing completion of beta.

    Of course I work in VB.net for now and it seems that as percieved VB.Net is for lightweights?

     

    LOL

     

    Friday, May 5, 2006 11:42 AM
  • User-143887530 posted

    Angelo,

    I just started uploading the bug tracker.net to my test site, unbelieveably slow ftp but i will let you know when i get it running, So you can check it out.

    Tom

    Friday, May 5, 2006 3:01 PM
  • User380413204 posted

    Hi all,

    I really hope I did not miss the solution for this one, but I tried to find posts about it and did not succeed.

    If it's already been delt with.....Sorry

    When you simply hit the upload_image button in Member_details with no image selected:

     

    Parameter is not valid.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.ArgumentException: Parameter is not valid.

    Source Error:

    The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:

    1. Add a "Debug=true" directive at the top of the file that generated the error. Example:

      <%@ Page Language="C#" Debug="true" %>

    or:

    2) Add the following section to the configuration file of your application:

    <configuration>
       <system.web>
           <compilation debug="true"/>
       </system.web>
    </configuration>

    Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.

    Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.

    Stack Trace:

    [ArgumentException: Parameter is not valid.]
       System.Drawing.Image.FromStream(Stream stream, Boolean useEmbeddedColorManagement, Boolean validateImageData) +394
       System.Drawing.Image.FromStream(Stream stream) +9
       ImageUtils.MakeThumb(Byte[] fullsize, Int32 newwidth, Int32 newheight) +57
       ASP.member_details_aspx.uploadimage_Click(Object sender, EventArgs e) +59
       System.Web.UI.WebControls.Button.OnClick(EventArgs e) +75
       System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +97
       System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
       System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
       System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4921
    

    Just found this one when looking at mr. Lunch's forum, thought the new code was the culprit at first. To be sure I started with a fresh CWS, and the problem was already there.

    Lex

    Tuesday, May 9, 2006 1:54 PM
  • User380413204 posted

    Sorry for the empty error page in the previous post (forgot it was fresh from the Template)

     

    Parameter is not valid.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.ArgumentException: Parameter is not valid.

    Source Error:

    Line 57: 
    Line 58:     Protected Sub uploadimage_Click(ByVal sender As Object, ByVal e As System.EventArgs)
    Line 59:         Dim thumbimage As Byte() = ImageUtils.MakeThumb(newavatar.FileBytes, 69, 69)
    Line 60:         Dim m As New DataSetTableAdapters.MemberInfo1TableAdapter
    Line 61:         Dim memberid As Guid = CType(Membership.GetUser().ProviderUserKey, Guid)

    Source File: C:\ClubWebSite1\Member_Details.aspx    Line: 59

    Stack Trace:

    [ArgumentException: Parameter is not valid.]
       System.Drawing.Image.FromStream(Stream stream, Boolean useEmbeddedColorManagement, Boolean validateImageData) +391
       System.Drawing.Image.FromStream(Stream stream) +9
       ImageUtils.MakeThumb(Byte[] fullsize, Int32 newwidth, Int32 newheight) +57
       ASP.member_details_aspx.uploadimage_Click(Object sender, EventArgs e) in C:\ClubWebSite1\Member_Details.aspx:59
       System.Web.UI.WebControls.Button.OnClick(EventArgs e) +75
       System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +97
       System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
       System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
       System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4921
    


    Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42
    <!-- [ArgumentException]: Parameter is not valid. at System.Drawing.Image.FromStream(Stream stream, Boolean useEmbeddedColorManagement, Boolean validateImageData) at System.Drawing.Image.FromStream(Stream stream) at ImageUtils.MakeThumb(Byte[] fullsize, Int32 newwidth, Int32 newheight) at ASP.member_details_aspx.uploadimage_Click(Object sender, EventArgs e) in C:\ClubWebSite1\Member_Details.aspx:line 59 at System.Web.UI.WebControls.Button.OnClick(EventArgs e) at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) [HttpUnhandledException]: Exception of type 'System.Web.HttpUnhandledException' was thrown. at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) at System.Web.UI.Page.ProcessRequest(HttpContext context) at ASP.member_details_aspx.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) -->
    Tuesday, May 9, 2006 2:01 PM
  • User654902800 posted

    in member_details.aspx:

        Protected Sub uploadimage_Click(ByVal sender As Object, ByVal e As System.EventArgs)
            Try
                ' next line errors if no image uploaded

                Dim thumbimage As Byte() = ImageUtils.MakeThumb(newavatar.FileBytes, 69, 69)
                Dim m As New DataSetTableAdapters.MemberInfo1TableAdapter
                Dim memberid As Guid = CType(Membership.GetUser().ProviderUserKey, Guid)
                Dim origid As Guid = memberid
                m.Update(memberid, thumbimage, origid)
                avatarimage.ImageUrl = "AvatarImagefetch.ashx?Memberid=" & memberid.ToString
            Catch ex As Exception
                ' maybe enable an error message label here
                Return
            End Try

        End Sub

    Tuesday, May 9, 2006 2:10 PM
  • User380413204 posted

    Hi Mark,

    Wow you're fast.

    That solves the error part.

    Could it be that with your AvatarImageFetch.ashx (bundled with the Forum) the Avatar is not immediately updated in Member_details?

    (Will get back to you on the forum when I have seen and tested it thorougly, but for now I can say it really has potential)

    Best regards,

    Lex

    Tuesday, May 9, 2006 2:22 PM
  • User654902800 posted

    Could it be that with your AvatarImageFetch.ashx (bundled with the Forum) the Avatar is not immediately updated in Member_details?

    No, but my version does set an expires header, I think to 10 minutes. I have this thing about *making* the browser cache stuff. But that's not good here, because that'll make it look like the upload failed when it's actually OK but the browser is showing you the previous image. You can just take out that line where it sets Expires.

    Tuesday, May 9, 2006 2:51 PM
  • User380413204 posted

    Hi,

    this is no exactly a  BUG

    But when you look at Login Page the lower rightblock(s) shift about 1 mm. to the left.

    Not visible in designtime.

    Can't find the culprit.

    Should be simple, but could not solve it with deducing and combining.

    Lex

    Friday, May 12, 2006 10:04 AM
  • User380413204 posted

    Remember me next  time

    Isn't this something of a bug?

    Doesn't seem to remember much.

    Lex

     

     

    Friday, May 12, 2006 11:09 AM
  • User1377904732 posted

    In the C# version of the Club Site when a user clicks "Add Event" will be directed to the add event page. If the user does not enter a description for the event, there's no validation for that field and it throws an error reporting a invalid conversion attempt from a DBNull. I haven't found a permanent fix for this because I'm not familiar with the "FormView" control that contains it. A quick fix was that on page load, if the user is adding a new event, I set the text property of the description text boxt to " " so that it is not null. If anyone knows a permafix for this, let me know.

    Thursday, June 15, 2006 4:15 PM
  • User-1182073291 posted

    Hi DudeBori82,

    I have implemented RequiredFieldValidator fields for all the things that I think are necessay in the database. You can also check each table via the Server Explorer so you know which fields are not allowed to be Null/Nothing.

    Limmer

    Monday, June 19, 2006 2:58 PM
  • User654902800 posted

    If you delete a location, and an event exists that uses that location, you cannot then edit the event.

    Quick, dirty fix, in locations_edit.aspx, find the delete command in the datasource and change it from

    DeleteCommand="delete from locations where id=@id"

    to

    DeleteCommand="delete from locations where id=@id;update events set location = NULL where location = @id"

    Tuesday, June 20, 2006 8:54 PM
  • User-1065173911 posted

    I found a bug in the events_list.aspx page. 

    I apologize if this bug has already been covered.  I looked through the posts and could not find any threads about it so I decided to post what I discovered.  Hope this helps.

    To simulate:

    1.  log in as admin
    2.  navigate to events_list
    3.  click "List View"
    4.  click the green rollover button "Remove"
    5.  you are redirected to Events_Edit.aspx
    6.  The event is not removed.

    Fix:

    Under Begin News Item comment, under <asp:repeater...>, within <ItemTemplate>, and within <asp:panel ID=panel2...>, the line

    "<Club:RolloverLink ID="RemoveBtn" runat="server" Text="Remove" NavigateURL='<%# "Events_Edit.aspx?Action=Remove&id=" & cstr(Eval("id")) %>'/>"

    should be changed to read

    <Club:RolloverLink ID="RemoveBtn" runat="server" Text="Remove" NavigateURL='<%# "Events_Edit.aspx?Action=delete&id=" & cstr(Eval("id")) %>'/>

    This fix passes the correct parameter value to "action" that is defined in the events_edit.aspx.  Until this fix, the logic in the events_edit.aspx page would fall through to the "Case Else" and land you at the event_edit instead of "removing" the event and redirecting you back to events_list.aspx.

    Below is the sub that the "action" value is passed to:

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)

    If Not IsPostBack Then

    'Initialize the fields

    Dim action As Object = Request.QueryString("Action")

    If Not action Is Nothing Then

    Select Case LCase(CStr(action))

    case "new"

    'We are in new mode

    FormView1.ChangeMode(FormViewMode.Insert)

    Dim lp As LocationsPicker = CType(FormView1.FindControl("LocationPicker1"), LocationsPicker)

    lp.LocationID = Nothing

    Dim dp As DurationPicker = CType(FormView1.FindControl("dtpicker"), DurationPicker)

    dp.startDateTime = Now

    dp.endDateTime = Now.AddHours(3)

    Dim slp As TextBox = CType(FormView1.FindControl("staticURLTextBox"), TextBox)

    slp.Enabled = False

    Case "delete"

    SqlDataSource1.Delete()  /*  This was origionally "Remove" and I changed to "Delete"

    Response.Redirect("Events_list.aspx")

    Case Else

    'We are in edit mode

    Dim cb As CheckBox = CType(FormView1.FindControl("CheckBox1"), CheckBox)

    Dim surl As TextBox = CType(FormView1.FindControl("staticURLTextBox"), TextBox)

    If Not surl.Text Is Nothing AndAlso surl.Text <> "" Then

    cb.Checked = True

    surl.Enabled = True

    Else

    surl.Enabled = False

    End If

    End Select

    End If

    End If

    End Sub

    Sunday, June 25, 2006 8:03 PM
  • User380413204 posted

    Hi,

    This is copied from an old post:

    I believe this is not solved yet: 

    I have the site up-and running, but when I try to add a News entry, and select a future date for the control that says ' The news article will not be visible to users until after this date.', this date doesn't seem to be respected.  If I add a news article to be displayed in the future, it still shows ALL the entries from both the home page as well as the news link.

    Anyone else have this problem?

    Lex

     

    Sunday, July 2, 2006 11:32 AM
  • User654902800 posted

    Another Club Kit surprise.

    In this case, it's the select statement in the sqldatasource on default.aspx, and the stored procedure PagedAnnouncementList, neither one does what the UI suggests it will do.

    To fix, in both places, add 'itemdate <= getdate()' to the where clause, i.e.: 

    SELECT top 5 [id], [itemdate], [title], [description], [photo] FROM [Announcements] 
    WHERE itemdate <= GETDATE() ORDER BY itemdate DESC
     
    Sunday, July 2, 2006 6:17 PM
  • User380413204 posted

    Mark,

    Once again I thank you.

    Man you are invaluable for this Forum.

    Truly awesome,

     

    Lex

     

    Monday, July 3, 2006 8:56 AM
  • User706866991 posted

    Would this be the correct syntax on the stored procedure?

     

    SELECT id, itemdate, title, description, photo FROM Announcements

    WHERE ((itemdate <= getdate())AND(itemdate > @keydate OR

    (itemdate = @keydate) AND (id > @keyid))

    ORDER BY itemdate ASC, id ASC

     

    Bob

     

    Wednesday, July 12, 2006 11:07 AM
  • User654902800 posted

    There was some other problem with that sproc, I forget what exactly, so I had written a slightly different version of it:

     

     
    ALTER PROCEDURE [dbo].[PagedAnnouncementList] 
    (
        @pageNum INT = 1,
        @PageSize INT = 10
    )
    AS
        -- Set the page bounds
    
        DECLARE @PageLowerBound int
        DECLARE @PageUpperBound int
        DECLARE @TotalRecords   float
        SET @PageLowerBound = @PageSize * (@pageNum - 1)
        SET @PageUpperBound = @PageSize - 1 + @PageLowerBound
    
        -- Create a temp table to put items in the order we want
    
        CREATE TABLE #ItemIndex
        (
            IndexId int IDENTITY (0, 1) NOT NULL,
            NewsId int
        )
    
        -- Insert into temp table
    
        INSERT INTO #ItemIndex (NewsId)
        SELECT a.id 
        FROM announcements a WHERE itemdate <= GETDATE() ORDER BY itemdate DESC, id DESC 
        
        -- Get the page we need from the ordered temp table    
    
        SELECT a.id, a.itemdate, a.title, a.description, a.photo FROM Announcements a
        JOIN #ItemIndex i ON i.NewsId  = a.id
        WHERE i.IndexId >= @PageLowerBound AND i.IndexId <= @PageUpperBound
        ORDER BY itemdate DESC, id DESC 
    
        -- Return the number of pages
    
        SELECT  @TotalRecords = COUNT(*)
        FROM    #ItemIndex
        RETURN CEILING(@TotalRecords/@pageSize)
     
    Wednesday, July 12, 2006 1:29 PM
  • User380413204 posted

    Hi,

    What problem are you guys adressing here?

    I thought my problems were solved with:

    SELECT top 5 [id], [itemdate], [title], [description], [photo] FROM [Announcements]
    WHERE itemdate <= GETDATE() ORDER BY itemdate DESC

    Lex

     

    Wednesday, July 12, 2006 1:44 PM
  • User654902800 posted
    The small query drives the news summary on default.aspx, the stored procedure drives news_list.aspx.
    Wednesday, July 12, 2006 2:47 PM
  • User380413204 posted

    Ah,

    ..... now I understand.

    Indeed NewsList does not show any news before the projected date.

    However in NewsView when I click on Next Article I still get to see the article before it's due.

    Am I alone in this?

    regards,

    Lex

    Wednesday, July 12, 2006 5:24 PM
  • User654902800 posted

    You are not alone - the stored procedures NextAnnouncement and NextPrevAnnouncement both also have no logic in them to suppress items with dates in the future. As well, the logic in News_View where it decides if the next and previous links should be hot is not quite right, it doesn't know if the link is hot until after you click it (click next until you get to the end, it will allow you one more click which does nothing before it makes the link disabled). This should be rewritten somehow.

    I'm not motivated to work on this particular issue myself, but what I would probably do is something like make a single procedure which

    -builds a temp list of viewable items where itemdate <= getdate()
    -selects from temp the previous item id into a variable (null if we are at the first one) @prev
    -selects from temp the next item id into a variable (null if we are at the last one) @next
    -selects the item we want into a variable @item

    then select bla, bla, bla,@prev, @next from announcements where id = @item

    now we have all the info to make the page in one go

    so in sqldatasource1_selected() we can set whether the next and previous links go anywhere.

    If you don't want to do this, and your site depends heavily on being able to create news items that are hidden until the due date, then I would just remove the next/prev links from news_view, I don't think they are that useful, even if they are cool. They also have this unpleasant side effect in that the URL does not change, so if you go to article 6 and then use the next link to move to article 7, and you bookmark the page, the bookmark will point to ... article 6. Kinda weird. Not so big an issue in the list pages, but odd in a content page.

     

    Wednesday, July 12, 2006 6:14 PM
  • User380413204 posted

    Hi mark,

    Removing or hiding the linkbuttons is the way to go for me at this point. Cleans the page up quite nicely at the same go.

    Perhaps in the future when I know a little bit more about this stuff I'll address it.

    I wish everybody that is not motivated to tackle a problem would be so willing to desribe that same problem.

    Many thanks,

    Lex

    Thursday, July 13, 2006 2:35 AM
  • User742541801 posted

    Lex et al, isn't this problem solved by modifying the stored procedures to add an itemdate < GETDATE() condition?

     

     
    set ANSI_NULLS ON
    set QUOTED_IDENTIFIER ON
    go
    
    ALTER PROCEDURE [whatever].[NextPrevAnnouncement] 
    (
    @id int,
    @previd int output,
    @nextid int output
    )
    
    AS
    /* SET NOCOUNT ON */ 
    
    DECLARE @curr datetime
    
    SELECT @curr = itemdate
    FROM Announcements
    WHERE (id = @id)
    
    
    SELECT @previd= id
    FROM Announcements
    WHERE (itemdate < @curr OR
          (itemdate = @curr) AND (id < @id)) 
    ORDER BY itemdate ASC, id ASC
    
    
    SELECT @nextid= id
    FROM Announcements
    WHERE (itemdate < GETDATE() AND 
          (itemdate > @curr OR
          ((itemdate = @curr) AND (id > @id))))
    ORDER BY itemdate DESC, id DESC
    
    
     

    You would have to modify NextAnnouncement and NextPrevAnnouncement this way. There was some related logic in the News_View.aspx that was broken. It had to do with next/previous clicks, and deciding which items were valid and which not. See here for a description of the problem and a fix.

    Thursday, July 13, 2006 9:36 AM
  • User654902800 posted
    very cool cheeso!
    Thursday, July 13, 2006 2:33 PM
  • User55834437 posted

    I just added the required field validator on top of the description textbox and it worked fine with me. Sample code below

    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="Event description cannot be empty" ControlToValidate ="descriptionTextBox"></asp:RequiredFieldValidator>

    <asp:TextBox Text='<%# Bind("description") %>' runat="server" ID="descriptionTextBox"

    Rows="10" TextMode="MultiLine" Width="500px" Height="166px"></asp:TextBox>

    Saturday, July 29, 2006 1:34 PM
  • User-1069928006 posted
    I want to let my concerns to be known here in this thread. First I should say that I am new to asp.net I have done some codeing in VB6 but that was only to get my degree in business administration and networking. I was happy as a pig in shit when I came across this paticular subject. I read alotif not all of the submitted bugs and their fixes and let me tell you it was not easy. I am going to say that the easiest to follow was the very first fix and that is only because I could find the line and the code in a instance.Some one had mentioned that it would be nice if people posting could give the line number and the name of the file. This would aid in why we are here in the first place, and that is to find fixes for what we can not fix on our own. I see that this thread has had a short life it is a nowonder and perhaps it can be brought back to life with a little simplicity and straightforwardness.
    Monday, July 31, 2006 2:21 PM
  • User619008665 posted
    First off, let me say that I wish I would have found this on Monday instead of Friday night!  I am currently working through this post to correct all the bugs / issues and many thanks to everyone who posted.  Now for my comment.  I, too, added the required field validator to fix the error thrown when adding events but neglecting to add a description.  The problem started when I fixed another error with the same page where one clicks "Cancel" without entering anything (Bug #5 by BugSlayer on page 3 of this thread); the cancel button doesn't work because no description is entered for the cancelled addition.
    1.  Make the change outlined in Bug #5 AND add a required validator as described above.
    2.  Recreate the exact steps in Bug #5.
    3.  Instead of throwing an error (as happened before BugSlayer's fix), the cancel button does nothing beause the server validates the control, determines it is null (which is invalid), and prevents the cancellation.  End result is that Cancel does nothing and the user must navigate using another means.

    My fix for this will be to pass a parameter from each of the two pages that permit adding events; the calendar view and the list view (I know there's a third but it shouldn't be there in my opinion).  Each page will (once I figure out how - yes I'm a noob) pass the same parameter with a different value to permit Cancel to return me to the page where I started.  I'm not sure why I'm returned to the Events_View page instead of from where I started.
    Saturday, August 5, 2006 3:19 AM
  • User619008665 posted
    Usability issues:
    The third way to add an event is, yup you guessed it, from the add new event page!  Clicking on add new event when one is adding a new event is not only from the Department of Redundancy Department, but also throws and error.  Not sure why the add new event division is included on the Events_Edit page in the first place but I just removed the <div></div> starting on line 75 of my Events_Edit page.

    When logging out, nothing happens visually to say you're logged out.  Clicking on another link / button will show that one is logged out but that is insufficient.  I added a response.redirect to Default.aspx to provide the user with a visible confirmation that they were logged out.  An easy fix that, thanks to login banner, required only two corrections to provide the same behavior for all logout buttons (the second response.redirect is on the login page displayed on Default.aspx).

    Saturday, August 5, 2006 3:29 AM
  • User619008665 posted
    I agreed with the RequiredValidator as a quick fix to prevent adding an event or an announcement (news item) without also requiring a description.  However, that prevented the Cancel button from working.  It also didn't fit with the database as the description field allowed Null entries.  So, I changed the inline code in Events_List.aspx, News_List.aspx, Events_Calendar.aspx, and Default.aspx to use the DataBinder rather than converting to string (after getting some great advice from my buddy Mike).  I also modified the Shared_routines.vb truncate functions.  Here is the original line from each of the four web pages:

    <%# truncate(CStr(Eval("description"))) %>'

    and Mike had me change it to:

    <%# truncate(DataBinder.Eval(Container.DataItem, "description")) %>'

    We then changed the truncate function to accept an object data type rather than string.

    Public Function truncate(ByVal originalInput As String) As String

    to:

    Public Function truncate(ByVal originalInput As Object) As String

    and I promptly got an error message.  After debugging, I found that the object I was passing (when the description wasn't added) was still null rather than empty "" and I still had the same error.  I then added a try-catch-end try before passing the output to the second truncate function.  The new truncate functions look like this:

    Public Module Shared_Routines

        Const TRUNCATE_COUNT As Integer = 50

        Public Function truncate(ByVal originalInput As Object) As String
            Try
                Dim originalInput1 As String = CStr(originalInput)
                Return truncate(originalInput1, TRUNCATE_COUNT)
            Catch
                Return ""
            End Try
        End Function

        Public Function truncate(ByVal originalInput As String, ByVal wordsLimit As Integer) As String
            If Not originalInput Is Nothing AndAlso originalInput <> "" Then
                Dim output As New Text.StringBuilder(originalInput.Length)
                Dim input As New Text.StringBuilder(originalInput)
                Dim words As Integer = 0
                Dim lastwasWS As Boolean = True
                Dim count As Integer = 0

                Do
                    If Char.IsWhiteSpace(input.Chars(count)) Then
                        lastwasWS = True
                    Else
                        If lastwasWS Then words += 1
                        lastwasWS = False
                    End If
                    output.Append(input.Chars(count))
                    count += 1
                Loop While (words < wordsLimit Or lastwasWS = False) And count < (originalInput.Length)

                Return output.ToString
            Else
                Return ""
            End If
        End Function

        Public Function Encode(ByVal contents As Object) As String
            Return HttpUtility.HtmlEncode(CStr(contents))
        End Function

    What happens is that the first truncate function attempts to convert the description to string and, if Null, returns empty "".  If not Null, then the converted string value is passed (along with the word count) to the second function where it counts and adds each character until the 50 word limit is reached; then it passes that value back to the page for display.  The second function's check for Null should never evaluate true but I left it in just in case.  I also tried to combine the two functions into one but VB threw a compile error.
    Monday, August 7, 2006 10:10 PM
  • User619008665 posted
    Oops!  Forgot to add that Locations_List.aspx needs to be changed as well.
    Monday, August 7, 2006 10:14 PM
  • User-1065173911 posted

    Nice looking code.  I like the word count routine. 

    An interesting property of the button control, or any control that causes postback(I think) is the "causes validation" property.  You can set the causes validation property of the Cancel button to false and use the navigate url property to redirect when the user presses the cancel button.  Setting the causes validation property to false for the cancel button results in the page parse without evaluating the validation controls on the page.  Then you can redirect back to where the user came from ( or where ever you like) using the navigate url property.  This allows you to use the required field validator, and other validation controls, on the page and still use a cancel button as well.

    It has occurred to me that a user may want to enter only an event title without a description and in this case your solution is best.  However, in the announcement(news item) I prefer to force the user to enter a description.  What good is only a news heading without any news.

    Monday, August 7, 2006 11:37 PM
  • User-1741449926 posted

    Hi Limmer,

    The following (line 130 in Events_List.aspx) also causes problem - it can't convert the Eval result (a System.DBNull type) to a string.

    <asp:Label ID="descriptionLabel" runat="server" Text='<%# SharedRoutines.truncate((string)Eval("description")) %>' />

    I'm new to html and asp.net so could you please detail for me where and how I should best fix this? I'm using Visual Web Developer 2005 Express.  Does it require implementation of RequiredFieldValidator fields as per your post above?  If so, do I just add the code right there in Events_List.aspx, or is there a more appropriate place?

    Cheers, hmeijeri.

    Tuesday, August 15, 2006 6:49 AM
  • User-1182073291 posted

    Hi hmeijeri,

    By using the RequiredFieldValidator in the Events_Edit.aspx page you prevent the Administrators to leave the description field empty, so you don't have problems in other pages like Events_View.aspx or Events_List.aspx.

    Below you can see my InsertItemTemplate for the Events_Edit.aspx page, including the RequiredFieldValidators.

    Limmer

    <InsertItemTemplate>
    <div class="actionbuttons">
    <Club:RolloverButton ID="GreenRolloverButton2" CommandName="Insert" Text="Toevoegen" runat="server" />
    <Club:RolloverLink ID="GreenRolloverLink1" Text="Annuleren" runat="server" NavigateURL='<%# "Events_calendar.aspx" %>' CausesValidation="false" />
    </div>
    <div class="dashedline">
    </div>
    <asp:ValidationSummary ID="valSummary" runat="server" ShowMessageBox="true" ShowSummary="false" HeaderText="The following fields are mandatory:" />
    <table>
    <tr>
    <td class="formlabel">
    <asp:Label ID="lblTitle" runat="server" Text="Titel:" />
    <asp:RequiredFieldValidator ID="valTitle" runat="server" ErrorMessage="title" ControlToValidate="txtTitle" Text="*" />
    </td>
    <td align="left">
    <asp:TextBox ID="txtTitle" runat="server" Width="500px" Text='<%# Bind("title") %>' />
    </td>
    </tr>
    <tr>
    <td class="formlabel">
    <asp:Label ID="lblDescription" runat="server" Text="Description:" />
    <asp:RequiredFieldValidator ID="valDescription" runat="server" ErrorMessage="description" ControlToValidate="txtDescription" Text="*" />
    </td>
    <td align="left">
    <asp:TextBox Text='<%# Bind("description") %>' runat="server" ID="txtDescription" Rows="10" TextMode="MultiLine" Width="500px" Height="166px" MaxLength="1000" />
    </td>
    </tr>
    <tr>
    <td class="formlabel">
    <asp:Label ID="lblDate" runat="server" Text="Date:" />
    </td>
    <td align="left">
    <Club:Durationpicker ID="dtpicker" runat="server" startDateTime='<%#Bind("Starttime") %>' endDateTime='<%#Bind("endtime") %>' />
    </td>
    </tr>
    <tr>
    <td class="formlabel">
    <asp:Label ID="lblPhoto" runat="server" Text="Photo:" /></td>
    <td align="left">
    <Club:Photopicker ID="Photopicker1" runat="server" ImageId='<%# Bind("photo") %>' />
    </td>
    </tr>
    </table>
    <div class="dashedline">
    </div>
    <div class="actionbuttons">
    <Club:RolloverButton ID="apply1" CommandName="Insert" Text="Save" runat="server" />
    <Club:RolloverLink ID="Cancel" Text="Cancel" runat="server" NavigateURL='<%# "Events_calendar.aspx" %>' CausesValidation="false" />
    </div>
    </InsertItemTemplate>

    Tuesday, August 15, 2006 8:39 AM
  • User-1741449926 posted
    Thanks Limmer, It makes sense. Much appreciated, Henk.
    Tuesday, August 15, 2006 9:21 AM
  • User1610799562 posted

    1) "Login in an Admin role and add a new Event"

    How do I add a new Event? from here...

    2) Because U have no Albums the Album combo-box is empty. Let it be so.

    Should I delete all  the Photo_News under images folder?

    I just start to work on this Clubsite and I am a newbie with ASP.NET 2.0,  and I found your guys posted are awesome... I learned a lot!!

    Thanks

    sqlm002

     

     

    Wednesday, August 30, 2006 1:18 AM
  • User1610799562 posted

    Have anyone translated bug# 6  from C# to Vb.Net?  If you do have it please e-mail me the script..I am appreciate very much.

    Thanks 

     

    Wednesday, August 30, 2006 2:20 AM
  • User1610799562 posted

    Hello this is Sqlm002

     The original  "scale = iOriginal.Width / maxwidth;"  work fine for me. :)

    Thursday, August 31, 2006 1:13 AM
  • User1610799562 posted

    Hello,

    This is Sqlm002

    I am just started working with the ClubWebsite.   I copied your code to  News_view.aspx, and I kept getting this error.   Would somebody give me some advice.   Thank you! 

     

    Compilation Error

    Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

    Compiler Error Message: CS0103: The name 'SharedRoutines' does not exist in the current context

    Source Error:

    Line 517:                            (last updated by 
    Line 518:
    Line 519:                                <asp:Label ID="postedByLabel" runat="server" Text='<%# SharedRoutines.truncate(Eval("postedBy").ToString()) %>' />)
    Line 520:
    Line 521:                            </p>


    Source File: c:\AppDev\ClubWebSite2\News_view.aspx    Line: 519

     

    Thursday, August 31, 2006 2:00 AM
  • User1610799562 posted

    I have found the way to add new Event.

    Thanks

    Thursday, August 31, 2006 2:49 AM
  • User1610799562 posted

    Hello,

    I tried add above code to member_details upload inmage, and still I have no image upload.   Have anyone got the member's image upload?

    Sqlm002

    Thursday, August 31, 2006 2:57 AM
  • User1610799562 posted
     I am getting this error while add news NEWS_Lists.   Have anyone got the similar error? and your has been fixed please instruct me what to do.  Thanks.

    Server Error in '/e-mail' Application.

    Conversion from type 'DBNull' to type 'String' is not valid.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.InvalidCastException: Conversion from type 'DBNull' to type 'String' is not valid.

    Source Error:

    Line 98:                             </h3>
    Line 99:                             <p>
    Line 100:                                <asp:Label ID="descriptionLabel" runat="server" Text='<%# truncate(CStr(Eval("description"))) %>' />
    Line 101:                                <a href='<%# "news_view.aspx?articleid=" &Cstr( Eval("ID"))%>'>read more &raquo;</a></p>
    Line 102:                            <div class="clearlist">

    Source File: C:\AppDev\e-mail\News_List.aspx    Line: 100

    Stack Trace:

    [InvalidCastException: Conversion from type 'DBNull' to type 'String' is not valid.]
       Microsoft.VisualBasic.CompilerServices.Conversions.ToString(Object Value) +606
       ASP.news_list_aspx.__DataBinding__control15(Object sender, EventArgs e) in C:\AppDev\e-mail\News_List.aspx:100
       System.Web.UI.Control.OnDataBinding(EventArgs e) +80
       System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +198
       System.Web.UI.Control.DataBind() +12
       System.Web.UI.Control.DataBindChildren() +212
       System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +208
       System.Web.UI.Control.DataBind() +12
       System.Web.UI.WebControls.Repeater.CreateItem(Int32 itemIndex, ListItemType itemType, Boolean dataBind, Object dataItem) +130
       System.Web.UI.WebControls.Repeater.CreateControlHierarchy(Boolean useDataSource) +435
       System.Web.UI.WebControls.Repeater.OnDataBinding(EventArgs e) +54
       System.Web.UI.WebControls.Repeater.DataBind() +62
       System.Web.UI.WebControls.Repeater.EnsureDataBound() +55
       System.Web.UI.WebControls.Repeater.OnPreRender(EventArgs e) +13
       System.Web.UI.Control.PreRenderRecursiveInternal() +88
       System.Web.UI.Control.PreRenderRecursiveInternal() +171
       System.Web.UI.Control.PreRenderRecursiveInternal() +171
       System.Web.UI.Control.PreRenderRecursiveInternal() +171
       System.Web.UI.Control.PreRenderRecursiveInternal() +171
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5731
    


    Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42
    <!-- [InvalidCastException]: Conversion from type 'DBNull' to type 'String' is not valid. at Microsoft.VisualBasic.CompilerServices.Conversions.ToString(Object Value) at ASP.news_list_aspx.__DataBinding__control15(Object sender, EventArgs e) in C:\AppDev\e-mail\News_List.aspx:line 100 at System.Web.UI.Control.OnDataBinding(EventArgs e) at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) at System.Web.UI.Control.DataBind() at System.Web.UI.Control.DataBindChildren() at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) at System.Web.UI.Control.DataBind() at System.Web.UI.WebControls.Repeater.CreateItem(Int32 itemIndex, ListItemType itemType, Boolean dataBind, Object dataItem) at System.Web.UI.WebControls.Repeater.CreateControlHierarchy(Boolean useDataSource) at System.Web.UI.WebControls.Repeater.OnDataBinding(EventArgs e) at System.Web.UI.WebControls.Repeater.DataBind() at System.Web.UI.WebControls.Repeater.EnsureDataBound() at System.Web.UI.WebControls.Repeater.OnPreRender(EventArgs e) at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) [HttpUnhandledException]: Exception of type 'System.Web.HttpUnhandledException' was thrown. at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) at System.Web.UI.Page.ProcessRequest(HttpContext context) at ASP.news_list_aspx.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) -->
    Sunday, September 3, 2006 10:50 PM
  • User-995012800 posted

    Hi,

    I'm working on the club site starter kit now for a week , and it's coming along nicely . There is one thing I haven't solved yet and I think it's kinda a bug [:)].

    Uploading files into categories works fine, but when you hit the delete-button, the row is deleted, but the file remains on the server.

    When searching for the solution to this problem, i've found that you have to use the Gridview.RowDeleting() function to delete the file. Example:

     

    1    protected void GridView1_RowDeleting(Object sender, GridViewDeleteEventArgs e)
    2    {
    3    
    4    	System.IO.File.Delete("[Path]")
    5    
    6    }
    7    

    I know I can get the path from e (the GridViewDeleteEventArgs), but how do you do it?

    I'm then guessing when filling in the path, my problem will be solved, no?

     

    best regards,

     

    Dimitri

    Sunday, September 10, 2006 4:23 PM
  • User523970105 posted

    Hi,

    I'm working on the club site starter kit now for a week , and it's coming along nicely . There is one thing I haven't solved yet and I think it's kinda a bug [:)].

    Uploading files into categories works fine, but when you hit the delete-button, the row is deleted, but the file remains on the server.

    When searching for the solution to this problem, i've found that you have to use the Gridview.RowDeleting() function to delete the file. Example:

     

    1    protected void GridView1_RowDeleting(Object sender, GridViewDeleteEventArgs e)
    2    {
    3    
    4    	System.IO.File.Delete("[Path]")
    5    
    6    }
    7    

    I know I can get the path from e (the GridViewDeleteEventArgs), but how do you do it?

    I'm then guessing when filling in the path, my problem will be solved, no?

     

    best regards,

     

    Dimitri

    I assume that you are talking about the extended clubsite modified to store files in a directory instead of in the database?  If so, try this (it's in VB instead of C#, but hopefully it will point you in the right direction):

    Protected Sub GridView2_RowDeleting(ByVal sender As Object, ByVal e As GridViewDeleteEventArgs)
        'Since documents are not stored in the database, they must be deleted from
        'the filesystem when the user clicks the delete button in the gridview
       
    File.Delete(Server.MapPath("~\files\") & e.Values(0).ToString())
    End Sub

    Monday, September 11, 2006 1:48 AM
  • User-995012800 posted

    Thanks a lot!

    It's working now.

    Monday, September 11, 2006 2:25 AM
  • User1275632693 posted

     

     Hi folks,

     Well it has been a while since I was able to get back to the CSK, I had to rebuild my box as the previous drive went down and I could not recover any of my data.

    So I installed a new copy of the Kit and am back at square one, this being said I still think we need a formal release of the kit which includes all the fixes that are

    listed here or has this been done already? 

    I can't imaging having to retrace all the steps I took at the very begining and have to redo all the work.

     

    Tuesday, December 26, 2006 10:33 AM
  • User322206306 posted

    I too have just started fresh with the kit from scratch again after months without working with it and spent the last two hours sifting through the fixes and refreshing my memory. As big (or maybe tedious would be more accurate) a challange it is, I'm really grateful for all the work put that's been put it to helping others. As one of those others I'd like to say THANK YOU!

    keep on posting, Dravend

    Tuesday, December 26, 2006 3:47 PM
  • User1936008133 posted

    I'm using the kit and loving it. I have a change I would like to make but I'm not sure how to go about doing it.

     On the Member_Details.aspx page I would like to use the Photos_FormPicker.ascx control, to allow the user to select an Avatar from a Member Photos Album that I have already created.
     How can I do this and update the members image with the one selected with the Photos_FormsPicker.ascx controls?

     Please help this is the last major change, before my site go's live.

    This fourm rocks, and a big thanks to all the contributers.

    Carl

    carl@codelogix.com

     

     

    Friday, January 5, 2007 3:43 AM
  • User-1563988197 posted

    I HAVE AN ISSUE TRACKER UP

    Previously it was said that the IssueTracker starterkit should be put online for this sort of thing... I can put it up if someone hasn't already gotten to it :) 

    Saturday, January 20, 2007 1:04 PM
  • User-1601355608 posted

    Hello, I have an error with my club site that may be very simple, but, I am very new and don't know how to fix it. 

    It says Incorrect Syntax Near '<' when I click on my Home page and an event view page. Every other page works. 

    I thought that you would be able to help me fix this and have it posted for others like me to use.

    Thanks in advance,

    dpr 

    Saturday, January 27, 2007 10:59 PM
  • User-302016627 posted

    I HAVE AN ISSUE TRACKER UP

    Previously it was said that the IssueTracker starterkit should be put online for this sort of thing... I can put it up if someone hasn't already gotten to it :) 

    Hi Zowens,

    I take the liberty of giving the Green signal, as no one has replied to your proposal yet.

    Please go ahead and put up an issue tracker kit and let the members know about it.

    I assume it will be at no-cost to users, and I hope U realize it will be a very long term commitment. But U can always tap in to things like Google Ad-sense etc. to support it [;)]

    Thanks for taking the initiative.[Yes] Godspeed !

    Tuesday, January 30, 2007 1:35 PM
  • User-1563988197 posted
    Issue Tracker

    http://club.eagleenvision.net

    Thursday, February 1, 2007 5:45 PM
  • User-1563988197 posted

    Once you create a username and password Click the EMAIL button above and put "Club Added" and I will reply when you are into the project.

    Saturday, February 3, 2007 3:53 PM
  • User-242910145 posted
    this didn't work for me.  the pics are still out of proportion.  do i need to upload them again?
    Tuesday, February 6, 2007 9:50 AM
  • User-1563988197 posted
    All the people that signed up for the issues starter kit site are now configured to enter the Club project :)
    Wednesday, February 7, 2007 4:55 PM
  • User-1563988197 posted

    http://codeplex.com/clubstarterkit

     

    its official... its now on CodePlex and under active development!

    I will likely take down the issue tracker... use the one on CodePlex.

    Thursday, February 15, 2007 5:26 PM
  • User742541801 posted
    Hallelujah!
    Thursday, February 15, 2007 8:07 PM
  • User872734279 posted

    As hard as you may have put it--I agree.

    • The file the code resides in
    • The function or proc name 
    • paste of the line of code that contains the issue.
    • any specific error message
    Wednesday, March 7, 2007 2:03 PM
  • User-983969139 posted

    I can't seem to figure this out and it appears to be a bug so I am posting it here.

    I've read much about validating on the edit_events page to stop errors but how do you validate the "durationpicker" control?? Or rather I should say, how do you declaratively validate the datepicker inside the durationpicker???

    There is a try/catch codeblock in the datepicker code but I can't seem to get it to work. I'd like to reuse this durationpicker but if I can't get it to validate then it is useless to me.

     ----------------------------------------------------------------------------------------------------
    Public Property SelectedDate() As Date

    Get

    EnsureChildControls()

    Dim d As Date

    Try

    d = Date.Parse(_innerTbx.Text)

    errorText = Nothing

    _innerCal.SelectedDate = d

    Catch

    errorText = "Date needs to be specified as mm/dd/yyyy"

    End Try

    Return d

    End Get

    Set(ByVal value As Date)

    EnsureChildControls()

    _innerCal.SelectedDate = value

    _innerTbx.Text = value.ToShortDateString

    End Set

    End Property
    -----------------------------------------------------------------------------------------------------------------------



    Is anyone else having this problem? Can anybody out there please help me???

    Thanx

    Wednesday, May 30, 2007 12:06 PM
  • User-1696171875 posted

    hI i GOT THE cLUBSITESTARTER KIT AND I KEEP GETTING THIS ERROR http://www.anointedvesseldanceministry.org/advm7/DEFAULT.ASPX

     http://www.anointedvesseldanceministry.org/advm7/ 

     I add the database and I change the app settings to

    <?xml version="1.0"?>

    <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">

    <location path="events_edit.aspx">

    <system.web>

    <authorization>

    <allow roles="Administrators"/>

    <deny users="*"/>

    </authorization>

    </system.web>

    </location>

    <location path="admin">

    <system.web>

    <authorization>

    <allow roles="Administrators"/>

    <deny users="*"/>

    </authorization>

    </system.web>

    </location>

    <location path="locations_edit.aspx">

    <system.web>

    <authorization>

    <allow roles="Administrators"/>

    <deny users="*"/>

    </authorization>

    </system.web>

    </location>

    <location path="news_edit.aspx">

    <system.web>

    <authorization>

    <allow roles="Administrators"/>

    <deny users="*"/>

    </authorization>

    </system.web>

    </location>

    <location path="photoalbum_new.aspx">

    <system.web>

    <authorization>

    <allow roles="Administrators"/>

    <deny users="*"/>

    </authorization>

    </system.web>

    </location>

    <location path="member_list.aspx">

    <system.web>

    <authorization>

    <deny users="?"/>

    </authorization>

    </system.web>

    </location>

    <location path="member_details.aspx">

    <system.web>

    <authorization>

    <deny users="?"/>

    </authorization>

    </system.web>

    </location>

    <connectionStrings>

    <add name="ClubSiteDB" connectionString="data source=ipaddress;initial catalog=catalog;user ID=userid;password=password;" />

     

    <!-- <add name="ClubSiteDB" connectionString="initial catalog=ClubDB;Data Source=.\SQLExpress;Integrated Security=true;AttachDBFileName=|DataDirectory|Club.mdf;User Instance=True" providerName="System.Data.SqlClient"/>

    -->

    </connectionStrings>

    <system.web>

    <xhtmlConformance mode="Strict"/>

    <roleManager enabled="true"/>

    <authentication mode="Forms"/>

    <compilation debug="true">

     

    wonder can you help me with this

    <assemblies>

    <add assembly="System.Xml, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>

    <add assembly="System.Messaging, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>

    <add assembly="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>

    </assemblies>

    </compilation>

    <membership defaultProvider="AspNetSqlMembershipProvider"/>

    <siteMap defaultProvider="AspNetXmlSiteMapProvider" enabled="true">

    <providers>

    <remove name="AspNetXmlSiteMapProvider"/>

    <add name="AspNetXmlSiteMapProvider" description="SiteMap provider which reads in .sitemap XML files." type="System.Web.XmlSiteMapProvider" securityTrimmingEnabled="true" siteMapFile="Web.sitemap"/>

    </providers>

    </siteMap>

    <customErrors mode="Off"/>

    <globalization requestEncoding="utf-8" responseEncoding="utf-8"/>

    </system.web>

    </configuration>

    Wednesday, June 6, 2007 11:58 PM
  • User-1696171875 posted

     http://www.anointedvesseldanceministry.org/advm7/DEFAULT.ASPX

    sorry this is the url do you think because my database ((using ms-sql2005)) should be dbo.data

    thank the created one when I ran the query 

    Thursday, June 7, 2007 10:06 AM
  • User-1696171875 posted

     You have an issue I see there is and Administration page here.

    Thursday, June 7, 2007 10:13 AM
  • User-1696171875 posted

    If you cannot connect using Your sql 2005 connection.  I found this connection string is very effective.

     

    <connectionStrings>

    <add name="ClubSiteDB" connectionString="Data Source=Connection;Initial Catalog=clubsite;User Id=clubsite;Password=password" providerName="System.Data.SqlClient"/>

    <!--This allows you to access the Security Tab under WebSite, ASP.NET Configuration-->

    <remove name="LocalSqlServer"/>

    <add name="LocalSqlServer" connectionString="Data Source=Connection;Integrated Security=True;User Instance=clubsite;Password=password" providerName="System.Data.SqlClient" />

    </connectionStrings>

    This seems to work when all connections fail.  Database using is MS-SQL 2005 express.

     

    If you need .net hosting with Ms-sql 2000 or Ms-sql 2005.  You can try http://www.Depositdata.com a small company that is still growing. But one thing I love about this company if you submit a ticket to a problem 24 hours someone always fixes or get back to you within a hour or less.

    And they are cheap but effective. And have been around since 2000 based out of Arizona and Whiteplains NY for there back up servers.

     

    Thursday, June 14, 2007 4:27 PM
  • User1892462997 posted

    I guess the c# code for the same would be:

    Convert.ToInt32("0" + AlbumList2.SelectedValue), i'm trying this now and it seems ok. 

    Wednesday, September 12, 2007 1:05 PM
  • User1892462997 posted

     The c# code:

    protected void update_Click(object sender, System.EventArgs e) {
            MembershipUser user 
    Membership.GetUser();
            
    DataSetTableAdapters.MemberInfoTableAdapter da = new DataSetTableAdapters.MemberInfoTableAdapter();
            if 
    ((Email.Text !user.Email)) {
                user.Email 
    Email.Text;
                
    Membership.UpdateUser(user);
            
    }
            
    try {
                da.Update(((Guid)(user.ProviderUserKey)), Addr.Text, Phone.Text, fname.Text, lname.Text, ((Guid)(user.ProviderUserKey)))
    ;
                
    ContactStatus.Text "Details have been updated sucessfully.";
                
    ContactStatus.ControlStyle.ForeColor Drawing.Color.Black;
            
    }
            
    catch (Exception ex) {
                ContactStatus.Text 
    ("Error updating contact details: " + ex.Message);
                
    ContactStatus.ControlStyle.ForeColor Drawing.Color.Red;
            
    }
        }

    Wednesday, September 12, 2007 1:32 PM
  • User-938130432 posted

    I'm getting the following error when using this code:

    Server Error in '/ClubWebSite1' Application.

    Object reference not set to an instance of an object.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

    Source Error:

    Line 87:             Dim FirstButton As Button
    Line 88:             FirstButton = CType(PageButtons.FindControl("P1"), Button)
    Line 89:             FirstButton.Style("background-color") = "#990000"
    Line 90:             FirstButton.Style("color") = "#FFFFFF"
    Line 91:         End If

    Source File: C:\Documents and Settings\rrodriguez\Personal\Visual Studio 2005\WebSites\ClubWebSite1\News_List.aspx.vb    Line: 89

    Stack Trace:

    [NullReferenceException: Object reference not set to an instance of an object.]
       News_List.Page_Load(Object sender, EventArgs e) in C:\Documents and Settings\rrodriguez\Personal\Visual Studio 2005\WebSites\ClubWebSite1\News_List.aspx.vb:89
       System.Web.UI.Control.OnLoad(EventArgs e) +99
       System.Web.UI.Control.LoadRecursive() +47
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1436
    

    Monday, May 5, 2008 1:24 PM
  • User-1421328738 posted

    Because there are no pagebuttons until you get more then a page of items, they don't exist.

    Put a 'try...catch...end try' around it that sinks the exception when they aren't there.

    Tuesday, July 1, 2008 4:10 PM
  • User-1088452795 posted

    I have been sifting through the help topics and have not seen this so forgive me if I'm repeating a previous entry.  I am brand new to this, and I have just installed the club site first edition.  I am getting an error while trying to create my first user.  It keeps kicking out an invalid password error telling me that a minimum of 7 digits and one has to be numeric.  I assure you that I have been doing just that.  The error keeps comming.  Can anyone help?

    Saturday, October 25, 2008 11:40 AM
  • User523970105 posted

    I have been sifting through the help topics and have not seen this so forgive me if I'm repeating a previous entry.  I am brand new to this, and I have just installed the club site first edition.  I am getting an error while trying to create my first user.  It keeps kicking out an invalid password error telling me that a minimum of 7 digits and one has to be numeric.  I assure you that I have been doing just that.  The error keeps comming.  Can anyone help?

    If I remember correctly, the default configuration requires one character in the password to be non-alphanumeric.  In other words, you have to use a special character like "!", "*", "%", etc.

     

    Wednesday, October 29, 2008 9:23 PM
  • User-1088452795 posted

     Thank you so much it is working now

    Monday, November 3, 2008 1:01 PM
  • User336377414 posted

    Does anyone on here know if the starter kit is getting these bugs applied or do we need to step through all of these and apply all of them?

    I am a begginer and neeed to get a site for a local Youth Flag Football league and beleive this kit could be my answer. ( I hope )

    Would I be better off starting with the expanded sites? or this one?

    Friday, May 8, 2009 1:28 PM
  • User-302016627 posted

    I would suggest U go for the new ClubSite Starter kit...the one thats designed for VS2008 DotNet 3.5

    Not only does it have less bugs (if any) but also has tons of other cool new features.

    So if U R already not invested in this Starter Kit...go for the new better one.

    Thanks 

    Friday, May 8, 2009 2:18 PM
  • User336377414 posted

    I am really just getting into it. (24 hours in)

    Can I use VS2005 with it? Or do I need to upgrade?

    Friday, May 8, 2009 2:30 PM
  • User-302016627 posted

    Upgrading would be best.

    Just like Visual Web Developer FREE version of VS2005,

    there's one available as an equivalent of VS2008, but I think Vista or a 64-bit OS may be the pre-requisite for it (but I'm not sure...it's best to check)

    If not, you try running it on VS2005 and see what happens...I don't think it'll CRASH in a really bad way....maybe minor tweaks may be required.

    Friday, May 8, 2009 4:20 PM
  • User-390097995 posted

    Do you have the link to the updated 3.5 Club Starter Kit?  When I look in the "Community" section of ASP.NET, all is see are the ASP.NET 2.0 Starter Kits.

     

     

    Thank you.

    Tuesday, May 19, 2009 10:01 PM
  • User-302016627 posted

    This is the Extended Starter Kit I'm talking about.

    http://www.asp.net/downloads/starter-kits/extended-club/

    It is not explicitly advertised as 3.5 version , but is new & improved and works real smooth with DotNet 3.5 framework and it's IDE.

    Many of the bugs mentioned in this thread are already resolved in this extended version.

    So you'd have no trouble getting up and running.

    Hope it helps.

    Wednesday, May 20, 2009 9:39 AM
  • User900737015 posted

    I have searched for a solution to this with no avail and I am at my wits end. (Not very far to go) I found a thread of people having the exact same issue , but with no solution. Maybe a bug? I can rename, edit delete albums, but can't insert new albums. Someone mentioned changing the stored procedure from "private" to "isprivate" but it was already "isprivate". Am I missing something? I get no errors just resdirected to the album list. Please HELP!

    Tuesday, October 20, 2009 9:33 PM