Page 2 of 3

Re: ContactUs Control

Posted: Thu Jan 15, 2009 9:43 am
by kastnerd
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.

Re: ContactUs Control

Posted: Fri Jan 16, 2009 6:26 am
by mazhar
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"]]

Re: ContactUs Control

Posted: Mon Jan 19, 2009 1:10 pm
by kastnerd
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.

Re: ContactUs Control

Posted: Tue Jan 20, 2009 4:35 am
by mazhar
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>.

Re: ContactUs Control

Posted: Tue Jan 20, 2009 7:27 am
by kastnerd
I found my problem. I was using Passive mode FTP and it did not fully upload the file.

Thanks

Re: ContactUs Control

Posted: Tue Jan 20, 2009 7:59 am
by mazhar
That's great

Re: ContactUs Control

Posted: Sun Feb 15, 2009 3:44 am
by Jaz
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,

Re: ContactUs Control

Posted: Tue Feb 17, 2009 5:29 am
by mazhar

Re: ContactUs Control

Posted: Thu Mar 05, 2009 7:22 am
by mazhar
ContactUs control in popup on product details page.
viewtopic.php?f=47&t=9983

Re: ContactUs Control

Posted: Thu Mar 05, 2009 8:30 am
by wave_werks
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.

Re: ContactUs Control

Posted: Thu Mar 05, 2009 9:13 am
by mazhar
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.

Re: ContactUs Control

Posted: Thu Mar 05, 2009 9:30 am
by wave_werks
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.

Re: ContactUs Control

Posted: Thu Mar 05, 2009 10:27 am
by mazhar
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

Re: ContactUs Control

Posted: Thu Mar 05, 2009 10:55 am
by wave_werks
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>

Re: ContactUs Control

Posted: Thu Mar 05, 2009 11:05 am
by mazhar
Just use the control as below

Code: Select all

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

Re: ContactUs Control

Posted: Thu Mar 05, 2009 11:36 am
by wave_werks
Ahhh... that's it. I forgot about that part.

This pop up is perfect. Thanks!

Re: ContactUs Control

Posted: Thu Mar 05, 2009 11:39 am
by mazhar
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.

Re: ContactUs Control

Posted: Thu Mar 05, 2009 11:44 am
by wave_werks
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.

Re: ContactUs Control

Posted: Thu Mar 05, 2009 2:27 pm
by wave_werks
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?

Re: ContactUs Control

Posted: Fri Mar 06, 2009 6:13 am
by sohaib
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.

Re: ContactUs Control

Posted: Fri Mar 06, 2009 10:25 am
by kastnerd
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.

Re: ContactUs Control

Posted: Wed Apr 01, 2009 11:27 am
by snap624
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. :)

Re: ContactUs Control

Posted: Wed Apr 01, 2009 11:43 am
by mazhar
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;

Re: ContactUs Control

Posted: Tue Apr 14, 2009 2:44 pm
by snap624
Thanks that worked fine. :D

Re: ContactUs Control

Posted: Thu Oct 08, 2009 7:11 pm
by compunerdy
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.