Portfolio: Fitzharris Bike & Sport
February 12, 2010Company: Fitzharris Bike & Sport
Website: http://www.fitzharrismn.com/bike/
![]()
Dahlin Development was contracted to give Fitzharris Bike & Sport an online presence. With a low-cost budget in mind I was able to put together a nice brochure site with a Wordpress blog integrated into it. The site also has a newsletter signup that I manage for them. A Google map was implemented to help visitors in getting to their bike shop. The site was built using asp.net and designed to be added on in the future.
Logo and Site design was provided by Nock Design Group.
I also provide web and email hosting for this site.
Feedback tab widget in ASP.NET
February 3, 2010I recently had a client that wanted a Feedback tab that you find on a lot of sites now a days. Something similar to Get Satisfaction or uservoice.

I couldn’t find anything out there that I liked so here is what I came up with. The approach I am about to describe will place the Feedback tab on every page that is using your Master Page.
I am using the ASP.NET AJAX Control Toolkit for the modal.
First we need to set the modal up.
- Make sure you have the AjaxControlToolkit assembly in your project references.
- Add the page directive for the Control Kit at the top of your Master Page:
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
- Add the ScriptManager to your Master Page:
<asp:ScriptManager ID="ScriptManager1" runat="server" />
- Place the Feedback tab on your site by adding it as an ASP.NET ImageButton and adding a cssclass to it:
<asp:ImageButton ID="lbFeedback" CssClass="tab" runat="server" ImageUrl="images/feedback.gif" />
- Add this styling to your css stylesheet:
.tab{position: fixed; right: 0; top: 250px;}This will position the tab on the right of the browser window.
- Now add the Feedback form inside a panel that will appear in the modal to the bottom of your Master Page just before the </form>.
<asp:Panel ID="pnlModal" runat="server" CssClass="modal"> <p>Thank you for taking the time to leave us feedback. Good or bad we want to know how your experience was at our establishment.</p> <p><label>Name:</label><br /><asp:TextBox ID="txtName" runat="server" /></p> <p><label>Email:</label><br /><asp:TextBox ID="txtEmail" runat="server" /></p> <p><label>Message:</label><br /><asp:TextBox ID="txtMessage" runat="server" TextMode="MultiLine" Columns="40" Rows="10" /></p> <asp:Button ID="btnSubmit" runat="server" Text="Submit" onclick="btnSubmit_Click" /> <asp:Button ID="btnCancel" runat="server" Text="Cancel" /> </asp:Panel> - Add the Modal Popup Extender control to handle the modal:
<ajaxToolkit:ModalPopupExtender ID="mpe" runat="server" TargetControlID="lbFeedback" PopupControlID="pnlModal" BackgroundCssClass="modalbg" CancelControlID="btnCancel"></ajaxToolkit:ModalPopupExtender>
- Lets add a Thank you message that is only visible after the feedback form is submitted. I add this at the top of the Master Page:
<div id="thankyou" runat="server" visible="false" class="thankyoumessage">Thank you for leaving feedback</div>
We now have a non-functioning Feedback form appearing inside a modal when the Feedback tab is clicked. A cancel button is there if they decide not too leave feedback after all.
By adding the ASP.NET Button control in the modal it will do a PostBack back to the page that can be handled in the Master Page’s code-behind. In the button handler I add the logic to simply email the submitted form to a desired email. See my previous post on how to do that.
![]()
At the end of the Submit Button handler I have a Page Redirect that sends the visitor back to the page they are on. Two reasons for this:
- In the redirect I pass a QueryString param to the page letting it know that Feedback has been submitted. In the PageLoad of the Master Page I check for this param and if it is present display a Thank You at the top of the page.
- Secondly I do a redirect so the visitor won’t do a refresh to get ride of the Thank You message, thus re-sending the feedback info again.
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack && !String.IsNullOrEmpty(Request.QueryString["fb"]))
{
// the feedback form has been filled out, display a thank you message.
thankyou.Visible = true;
}
}
/// <summary>
/// Handle the feedback form submit
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnSubmit_Click(object sender, EventArgs e)
{
// add the logic to handle the submited form fields
string currentPage = Request.Path;
Response.Redirect(currentPage + "?fb=1");
}
To sharpen it up a bit some final touches in the style sheet for the modal and the thank you message:
.thankyoumessage{background-color:#cc0000; color:#fff; padding:20px; font-size:3em; text-align:center}
.modal{background-color:#fff; border:solid 3px gray; padding:8px; width:350px; height:450px;}
.modalbg{filter: Alpha(Opacity=70); -moz-opacity:0.7; opacity: 0.7; width: 100%; height: 100%; background-color: #000000; position: absolute; z-index: 500; top: 0px; left: 0px;}
I’ve put together a simple example website with all this working for download here.
There certainly is more that can be added upon this such as making the thank you message only visible for 3 seconds. But, I think this is a good foundation.
Skype for business
January 30, 2010Here comes my first in a long series of posts about tools and services that I use for my business. My hopes are to help others find a better way to do things they are currently using or even better yet, someone tell me a better way to do something that I am currently doing. I hope to get feedback on what is and isn’t working for them, other options and more.
For my business phone I use Skype. I’ve used it for over two years now. For the money I can’t beat it. For under $100 a year here’s what I get :
- My own phone number that can be called from any phone whether it be mobile or land line.
- Calls to any number in the U.S.
- Voicemail. Email alert when i receive new voicemail.
- Video conferencing
- Conference calling
- Call forwarding to my cell when I am not at my desk
- IM with anyone else on Skype
- All my contacts in a list that I can just click on to call.
- Contacts synched with Outlook
- Phone numbers in my browser can be clicked on and called through Skype
- Skype button for my website that users can click to Skype me
I use Skype daily. i initially got it because my cell phone wouldn’t come in that clear in my office. I’ve never had an issue with clarity on Skype. I use a headset when I am on the phone and the webcam for video & audio when video conferencing. I have heard good things about an actual phone for Skype.
Skype works great for what I use it for. However, I have ran into a few issues with it.
When i first got setup with Skype I paid to have my number for 3 months. After my 3 months were up I needed to renew the number. I had some major issues trying to renew it. I couldn’t figure out how to pay for it. It turned out I kept adding Skype credits to my personal account when I was needing to add them to my business account. I ended up losing my number for a few days before I got it all straightened.
Skype doesn’t have a support number that you can call, it all had to be done through email and their forums. The response time was about a few days too.
Enough of the bad, more good things you can do with Skype.
- If you have a business with employees you can manage all phone numbers in your business account online.
- Call recording add-on
- Fax add-on
- File Sharing add-on
- Screen Sharing add-on
See more extras here.
Everyone knows how import communication is for business. Skype can work for all sized businesses for the self employed up to large companies spread about the world.
For me I love having a business number that people can call. When I am not in the office I can decide if I want to continue to get calls by the call-forwarding option or let them go to v-mail.
Here is a another review of Skype and a Skype phone I mentioned earlier, http://www.anywhereman.com/2009/07/can-you-hear-me-now/
Skype users, how are you using Skype for your business?
Google Voice users, is it time I switch?
Does anyone use an add-on that they can’t live without?
I want to hear about how you’re using it or what you have found works better than Skype.
Portfolio: StillPointe Natural Health Center
January 28, 2010![]()
This is my first post dedicated towards my portfolio. I’ve had my site up for over a year now, but still have not created a portfolio for it. I have a lot to add to it and am coming to the realization that I will never get it done if I try to do it all at once.
My plan is to start creating a blog post for all my portfolio items in hopes that creating it in increments, it will eventually get done.
I am going to start from the beginning.
The first site I worked on as a freelancer is StillPointe, www.stillpointe.net, a Natural Health Center. I was brought into the project by Nock Design Group. The client wanted a re-design of the site with the ability to manage it themselves.
Nock Design Group did the complete design of the site as well as their “I’m Back …” campaign. I took the PSD design and converted it to the web using css and div tags. I built the site on top of Kentico CMS. StillPointe can now manage all the copy on their site. The client liked using Google’s calendar feature, so that was implemented into the site along with a Google map. Finally a newsletter sign-up and blog were built into the site.
The site is also hosted with me. I’ve found a way to optimize Kentico sites on my server. A new post about that will come in the future.
With the combination of Nock Design Group’s design and my implementation of the site on top of Kentico CMS we were able to deliver an excellent site for StillPointe that they can completely manage at a very reasonable cost.
Sending email on Rackspace Cloud using asp.net
January 20, 2010I have hosted with the Rackspace Cloud now for about two years. I really couldn’t be happier with them and would recommend them to anyone. The one thing I have seemed to have issues with is sending emails from my web applications. After talking with support and doing some testing I have a solution that should last.
Here is an example of a basic contact form.
First set the smtp information in the web.config
<system.net> <mailSettings> <smtp> <network host="mail.emailsrvr.com" userName="info@mydomain.com" password="mypassword" port="25"/> </smtp> </mailSettings> </system.net>
I put this at the very bottom of the web.config just before the closing tag.
Note that the userName and password must be of a valid email address of the domain you are sending from. Make sure to set this up through their control panel.
I also add in the appSettings of the web.config the email addresses of whom to send it to and the subject line. Just best practices.
<appSettings> <add key="mailTo" value="joel@mydomain.com"/> <add key="mailSubject" value="Contact Form inquiry"/> </appSettings>
Now my example is of an asp.net web application in c#. I am going to assume everyone knows how to setup the page, lets go to the code-behind.
You will need to add these three lines to your using block.
using System.Web.Configuration; using System.Text; using System.Net.Mail;
The submit button handler:
/// <summary>
/// Handles the contact form submit
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void imtbtnSubmit_Click(object sender, ImageClickEventArgs e)
{
StringBuilder body = new StringBuilder();
body.AppendFormat("Company Name: {0}{1}", txtCompany.Text, Environment.NewLine);
body.AppendFormat("Contact Name: {0}{1}", txtName.Text, Environment.NewLine);
body.AppendFormat("Phone: {0}{1}", txtPhone.Text, Environment.NewLine);
body.AppendFormat("Email: {0}{1}", txtEmail.Text, Environment.NewLine);
body.AppendLine();
body.AppendLine("Message");
body.AppendLine(txtMessage.Text);
MailMessage message = new MailMessage(txtEmail.Text, WebConfigurationManager.AppSettings["mailTo"], WebConfigurationManager.AppSettings["mailSubject"], body.ToString());
SmtpClient client = new SmtpClient();
client.Send(message);
pnlForm.Visible = false;
lblMessage.Visible = true;
}
Pretty simple stuff, the import part is system.net in the web.config, making sure you have the correct host and port and a valid email.
You would think they would have this in their knowledge base, but as of this writing they don’t. I hope this helps someone.
-
Categories
- asp.net (7)
- Blog (1)
- Business (4)
- Errors (3)
- Portfolio (2)
- Reviews (1)
- SQL Server (3)
- Tips (1)
- Uncategorized (1)
- Web Development (10)
-
Archives