This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.
Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.
Before posting questions here you might want to review the developer documentation.
Hello Joe,
Thank you for creating all of these terrific tutorial and the in-depth documentation.
I have been following your tutorials and while doing this one, http://www.mojoportal.com/dev-series-14-first-guestbook-submission.aspx, I ran into an issue.
Two entries were being adding into my MSSQL database every time. I used breakpoints and stepped through the code, but I wasn't able to ascertain what the issues was.
I believe it may have something to do with Response.RawURL, I am not sure.
Any advise you have will be greatly appreciated.
I just wanted to provide some extra information:
I placed breakpoints and stepped over the code while querying the database through each step. The Save() method in the btnSubmit event handler did run twice for some reason; hence, causing the duplicate queries.
Most likely the events are wired up twice so they fire twice. If you wire up the events in OnInit then you need to set AutoEventWireup="false" in the top of the .ascx or .aspx file
Hope it helps,
Joe
I looked at my GuestBook.ascx file and the AutoEventWireUp was set to false; however, I noticed something incorrect in my markup.
<asp:Button ID="btnSubmit" runat="server" OnClick="btnSubmit_Click />
I double clicked the button in the VS WYSIWYG to create the event handler, out of habit. I also then subscribed to the button click again in OnInit() per your video.
I removed OnClick="btnSubmit_Click", recompiled and it worked perfectly.
Thanks again!