ContactUs Control

This forum is where we'll mirror posts that are of value to the community so they may be more easily found.
kastnerd
Commodore (COMO)
Commodore (COMO)
Posts: 474
Joined: Wed Oct 22, 2008 9:17 am

Re: ContactUs Control

Post by kastnerd » Thu Jan 15, 2009 9:43 am

This is good thanks for all the code.
I have not installed it yet.

What i would like is a contact us form with multiple send to options.
"Send to Shipping Department"
"General Question Sales and Suport"
"Sponsorship and Promotional"

And after the click send. get sent to a page that says "Message has been sent successfully" Or maybe a Ajax popup.

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: ContactUs Control

Post by mazhar » Fri Jan 16, 2009 6:26 am

Here is the next version of ContactUs control. This version provides support to show a list of send to emails, so that when placing a comment customer can select among different destinations. Also now after posting the comment the control will hide the Email form and will only show the message.
The control exposes a SendToList property. You can provide a display text and Email value for an Email address by separating these both with : character. Multiple emails will be separated by | sign. Check the following example usage. Please check the screen capture for output.

Code: Select all

[[ConLib:ContactUs EnableCaptcha="false" SendToList="Information:info@yourstore.com|Sales:sales@yourstore.com|jobs:jobs@yourdomain.com"]]

kastnerd
Commodore (COMO)
Commodore (COMO)
Posts: 474
Joined: Wed Oct 22, 2008 9:17 am

Re: ContactUs Control

Post by kastnerd » Mon Jan 19, 2009 1:10 pm

Thanks that is exactly what i wanted.
I am having trouble installing it tho.
I enterd in the Scriptlets

And now i get this error.
[[ConLib:ContactUs EnableCaptcha="false" SendToList="Information:*XXXXX*|Sales:*XXXX*"]] Unexpected end of file looking for </asp:Panel> tag.

Im not sure if its my scriptlets or the page.

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: ContactUs Control

Post by mazhar » Tue Jan 20, 2009 4:35 am

Did you customized the control, Its working for me without any error. Make sure that in ascx file the <asp:Panel must have the end tag </asp:Panel>.

kastnerd
Commodore (COMO)
Commodore (COMO)
Posts: 474
Joined: Wed Oct 22, 2008 9:17 am

Re: ContactUs Control

Post by kastnerd » Tue Jan 20, 2009 7:27 am

I found my problem. I was using Passive mode FTP and it did not fully upload the file.

Thanks

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: ContactUs Control

Post by mazhar » Tue Jan 20, 2009 7:59 am

That's great

User avatar
Jaz
Captain (CAPT)
Captain (CAPT)
Posts: 245
Joined: Wed Nov 05, 2008 4:04 am
Location: Torrance, CA
Contact:

Re: ContactUs Control

Post by Jaz » Sun Feb 15, 2009 3:44 am

On the control that allows attachments, how could I allow customer to submit multiple attachments. I am having a photo contest where customers can submit 5 photos.

Thanks,
David Jasiewicz
President
Trick Concepts - Metal Fab. Engineering and Product Design
http://www.trickconcepts.com-- If you are an ASP or PHP programmer or CSS web specialist I will gladly trade for graphic design, mechanical engineering or metal fabrication service! --


User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: ContactUs Control

Post by mazhar » Thu Mar 05, 2009 7:22 am

ContactUs control in popup on product details page.
viewtopic.php?f=47&t=9983

wave_werks
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 91
Joined: Mon Sep 22, 2008 8:37 pm
Location: Northeast Ohio
Contact:

Re: ContactUs Control

Post by wave_werks » Thu Mar 05, 2009 8:30 am

mazhar wrote:ContactUs control in popup on product details page.
viewtopic.php?f=47&t=9983
Mazhar,

Can you do the same for the email a friend function? I have a site where I've placed the code on the product page but it's rather ugly to see all of the text and text boxes right there on the page. I'd much rather see just a link on the page and let the pop-up do all of the work.

Also, for the files that are downloaded, the greybox folder and ContactBox.aspx, should they both be placed in the rood folder? Obviously the ContactUs.ascx and ContactUs.ascx.cs ConLib files go into the ConLib/Custom folder.
- Jeff
Wave Werks

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: ContactUs Control

Post by mazhar » Thu Mar 05, 2009 9:13 am

Also, for the files that are downloaded, the greybox folder and ContactBox.aspx, should they both be placed in the rood folder? Obviously the ContactUs.ascx and ContactUs.ascx.cs ConLib files go into the ConLib/Custom folder.
Yes they both will be on root.

wave_werks
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 91
Joined: Mon Sep 22, 2008 8:37 pm
Location: Northeast Ohio
Contact:

Re: ContactUs Control

Post by wave_werks » Thu Mar 05, 2009 9:30 am

I've just tried to add the "email a friend" function to the pop up. I got the pop up to work without a problem. But, the pop up displays the following error when attempting to display /Custom/ProductTellAFriend. The error is at line 35.

Code: Select all

 Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: The server tag is not well formed.

Source Error:

Line 33:                         <td>
Line 34: 
Line 35:                            <asp:Label ID="SentMessage" runat="server" SkinID="GoodCondition" EnableViewState="false" Visible="false" style=" Text="Message sent!" </asp:Label>
Line 36: 
Line 37:                             <asp:Label ID="FailureMessage" runat="server" SkinID="ErrorCondition" EnableViewState="false" Visible="false" Text="Message not sent."></asp:Label>
I do not get this error when the function is used outside of the pop up.
- Jeff
Wave Werks

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: ContactUs Control

Post by mazhar » Thu Mar 05, 2009 10:27 am

It seems that you disturbed the asp.net code formatting. Any how you can use this control for your purpose
viewtopic.php?f=47&t=9987

wave_werks
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 91
Joined: Mon Sep 22, 2008 8:37 pm
Location: Northeast Ohio
Contact:

Re: ContactUs Control

Post by wave_werks » Thu Mar 05, 2009 10:55 am

Okay. I've changed to the new version and it works great. Thanks!

I've made a couple of small changes...
I modified the height of the pop up to restrict it from being too tall. I've also modified the text in the header which worked fine.

Now I want the text link to read "Send this product to a friend". Where do I make that change? I thought I changed it properly in the code below but it still shows only "Send Product" instead of "Send this product to a friend".

Here's my code...

Code: Select all

<%@ Control Language="C#" ClassName="SendProductPopup" %>
<%@ Register Src="ProductTellAFriend.ascx" TagName="ProductTellAFriend" TagPrefix="uc1" %>
<script runat="server">
    
    private string _LinkCaption = "Send Product";

    [Personalizable(), WebBrowsable()]
    public string LinkCaption 
    {
        get { return _LinkCaption;  }
        set { _LinkCaption = value; }
    }

    private string _PopupCaption = "Send product to a friend...";

    [Personalizable(), WebBrowsable()]
    public string PopupCaption
    {
        get { return _PopupCaption; }
        set { _PopupCaption = value; }
    }
    
    protected void Page_Load(object sender, EventArgs e)
    {
        SendProductLink.Text = LinkCaption;
        ProductTellAFriend1.Caption = PopupCaption;
    }
</script>
<ajax:UpdatePanel ID="SendProductPopupAjax" runat="server" UpdateMode="Conditional">
    <ContentTemplate>
    <asp:LinkButton ID="SendProductLink" runat="server" Text="Send This Product To A Friend" EnableViewState="false" />
    <asp:Panel ID="PopupDialog" runat="server" Style="display:none;width:200px;height:250px" CssClass="modalPopup">
                <uc1:ProductTellAFriend ID="ProductTellAFriend1" runat="server" />
                <asp:Button ID="CancelAddButton" runat="server" Text="Close" CausesValidation="false" />
    </asp:Panel>
    <ajax:ModalPopupExtender ID="SendProductPopupDialog" runat="server" 
                TargetControlID="SendProductLink"
                PopupControlID="PopupDialog" 
                BackgroundCssClass="modalBackground"                         
                CancelControlID="CancelAddButton" 
                DropShadow="false"
                 />
    </ContentTemplate>
</ajax:UpdatePanel>
- Jeff
Wave Werks

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: ContactUs Control

Post by mazhar » Thu Mar 05, 2009 11:05 am

Just use the control as below

Code: Select all

[[ConLib:SendProductPopup LinkCaption="Send this product to a friend"]]

wave_werks
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 91
Joined: Mon Sep 22, 2008 8:37 pm
Location: Northeast Ohio
Contact:

Re: ContactUs Control

Post by wave_werks » Thu Mar 05, 2009 11:36 am

Ahhh... that's it. I forgot about that part.

This pop up is perfect. Thanks!
- Jeff
Wave Werks

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: ContactUs Control

Post by mazhar » Thu Mar 05, 2009 11:39 am

It would be better if you post some of your product URL here which have this popup enabled. It would be a running example for other people.

wave_werks
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 91
Joined: Mon Sep 22, 2008 8:37 pm
Location: Northeast Ohio
Contact:

Re: ContactUs Control

Post by wave_werks » Thu Mar 05, 2009 11:44 am

mazhar wrote:It would be better if you post some of your product URL here which have this popup enabled. It would be a running example for other people.
The site is not live yet but I will gladly come back and edit this post and add links once it is. Thanks again for the help and quick answers for this one.
- Jeff
Wave Werks

wave_werks
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 91
Joined: Mon Sep 22, 2008 8:37 pm
Location: Northeast Ohio
Contact:

Re: ContactUs Control

Post by wave_werks » Thu Mar 05, 2009 2:27 pm

Mazhar,

I'd like to take this new ContactUs Popup control one step further and offer customers a contact form that uses the functionality of the ConLib SendProductPopup to send an email to the default admin address with the product info included in the email. So many times emails come in from our contact page asking about a product but the customer is quite vague about exactly which product. Combining the two controls into one would allow us to gather the customers info and get more info about the product on which they based their question. Of course, I'd prefer to have the cool new greybox popup since it looks so cool but the other version would work fine, too!

What needs to be done to make this happen?
- Jeff
Wave Werks

User avatar
sohaib
Developer
Developer
Posts: 1079
Joined: Fri Jan 23, 2004 1:38 am

Re: ContactUs Control

Post by sohaib » Fri Mar 06, 2009 6:13 am

wave_werks wrote:Mazhar,

I'd like to take this new ContactUs Popup control one step further and offer customers a contact form that uses the functionality of the ConLib SendProductPopup to send an email to the default admin address with the product info included in the email. So many times emails come in from our contact page asking about a product but the customer is quite vague about exactly which product. Combining the two controls into one would allow us to gather the customers info and get more info about the product on which they based their question. Of course, I'd prefer to have the cool new greybox popup since it looks so cool but the other version would work fine, too!

What needs to be done to make this happen?
More than what should be supported through free forums has been posted already. Multiple version of a complete working 'contact us' control with source code. Now the users/developers must step up to handle their particular needs themselves.

If you need to know how to access a product object on the product page please search the forums; it has already been discussed in many places. If you don't find the answer you can post a new thread.

kastnerd
Commodore (COMO)
Commodore (COMO)
Posts: 474
Joined: Wed Oct 22, 2008 9:17 am

Re: ContactUs Control

Post by kastnerd » Fri Mar 06, 2009 10:25 am

I have a simple request,
On my current site i have a contact us box. Its set to display above the product description on products that are out of stock, I used a simple "if inventory=0"
I had the subject of the message be the Item name, and the body of the message to have a item link.

The only field the customer saw is there email address.

So they type in there email and click send, It sends me an email letting me know they want to be informed when the product is back in stock.

I am new to ASP so im not sure how to do this.

snap624
Lieutenant (LT)
Lieutenant (LT)
Posts: 58
Joined: Mon Jan 19, 2009 2:53 pm

Re: ContactUs Control

Post by snap624 » Wed Apr 01, 2009 11:27 am

Mahzar:

I like the Extended ContactUs control you have noted above. Is there a way to get the email subject to be the same as what is selceted in the Send To drop down, rather than just the generic "New Contact Message"? Thanks in advance for any info. :)

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: ContactUs Control

Post by mazhar » Wed Apr 01, 2009 11:43 am

snap624 wrote:Mahzar:

I like the Extended ContactUs control you have noted above. Is there a way to get the email subject to be the same as what is selceted in the Send To drop down, rather than just the generic "New Contact Message"? Thanks in advance for any info. :)
Edit the ContactUs.ascx.cs file and locate following information

Code: Select all

mailMessage.Subject = Subject;
and replace it with following piece of code

Code: Select all

mailMessage.Subject = DDSendToList.SelectedItem.Text;

snap624
Lieutenant (LT)
Lieutenant (LT)
Posts: 58
Joined: Mon Jan 19, 2009 2:53 pm

Re: ContactUs Control

Post by snap624 » Tue Apr 14, 2009 2:44 pm

Thanks that worked fine. :D

User avatar
compunerdy
Admiral (ADM)
Admiral (ADM)
Posts: 1283
Joined: Sun Nov 18, 2007 3:55 pm

Re: ContactUs Control

Post by compunerdy » Thu Oct 08, 2009 7:11 pm

jmestep wrote:On a contact form I made, I moved the message up above the send button so it would be more obvious that it was sent. I also cleared the fields in the form after the message was sent. I think you could do that in this one in this section of code:
try
{
MessageLabel.Text = "Message Sent";
MessageLabel.CssClass = "goodCondition";
EmailClient.Send(mailMessage);
[Add this]
Email.text="";
Name.text="";
Comment.text="";

}
This just gives a error. Is there anyway to clear the form on the first or second set of code posted? I get people resending 3-4 times.

Post Reply