Click here to Skip to main content
12,502,578 members (55,363 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: ASP.NET
(Footer.ascx page)
For News letter :

<div class="latest-updates">
                <span class="topic-header">Updates on Latest Deals</span>
                <div class="sub-blocks">
                    <p class="heading">Subscribe for <strong>Newsletter</strong></p>
                    <p>Get email alerts for online deals and instore offers!</p>
                     <%--<nopCommerce:signup ID="signup1" runat="server" /> --%>
                     <nopCommerce:signup ID ="sign" runat="server" />
 
                </div>

(Three.master page)
For Subscription :

<div class="newsletter-wrapper">
                <p>SUBSCRIBE FOR <strong>OFFERS</strong></p>
 
                <%--    <input class="newsletter itl" value="Enter Email Address" type="text" onfocus="focussed(this);" onblur="blurred(this);"><!-- pp modifed  clas itl and events added  on foucs and onblur-->
                    <input class="subscribe" value="" type="submit">
 

 
                  *********** Added on 6th oct 2012 ***********--%>
 

              <asp:ContentPlaceHolder ID="cph3" runat="server" >
             <nopCommerce:signup ID="signup" runat="server" />
              </asp:ContentPlaceHolder>
 

            </div>


My question is can we use the same nopcommerce:signup in two different files as i did in master n footer page , but the problem is when i clk on submit button for subscription it does not go to next page but where as whn i click on newletter submit button it gives me the next page can any have any idea how to resolve this?
Posted 8-Oct-12 0:01am

1 solution

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

Adding the same control to more than one page(though Footer.ascx is a user control) must not be an issue.

Anyway i dont think the way you have added the control to the master page is correct. You have placed the 'nopCommerce:signup' control inside a contentplaceholder in the master page. Content placeholders are added to master pages so that Webcontent Forms can use content controls (eg:
<asp:content contentplaceholderid="cph3" />
) to place its own html.

You must add a web content form to your project, specify the master page and then add your control into the added web content form.

If something else is the issue please provide more details regarding how you are using Footer.ascx and Three.master to display
<nopcommerce:signup id="signup"  runat="server" />
  Permalink  
v2
Comments
Member 9410081 8-Oct-12 7:46am
   
When i remove/comment the nopCommerce from footer the subscribe for offers is working properly,
but when i uncomment it the subscribe for offers submit button does go to next link.

my both footer and three.master are in same page .
Cibin Thomas Jacob 8-Oct-12 8:18am
   
can you post the html of the page with footer and three.master here?
Cibin Thomas Jacob 8-Oct-12 8:26am
   
You cannot add nopCommerce inside asp:ContentPlaceHolder in a master page. Move it to outside the placeholder.The placeHolder is for webcontent forms that use the master page to place html.
Member 9410081 8-Oct-12 8:43am
   
FOOTER :

<%@ Control Language="C#" AutoEventWireup="true" Inherits="NopSolutions.NopCommerce.Web.Modules.FooterControl"
CodeBehind="Footer.ascx.cs" %>
<%@ Register TagPrefix="nopCommerce" TagName="StoreThemeSelector" Src="~/Modules/StoreThemeSelector.ascx" %>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
<%--
<%@ Register TagPrefix="nopCommerce" TagName="signup" Src="~/Modules/signupoffers.ascx" %>--%>

<%--<%@ Register TagPrefix="nopCommerce" TagName="signup" Src="~/Modules/signupoffers.ascx" %>--%>

<script type="text/javascript">
$(document).ready(function() {
toggleAdvancedSearch();
});

function toggleAdvancedSearch() {
if (getE('ctl00_ctl00_cph1_cph1_ctrlSearch_cbAdvancedSearch').checked) {
$('#ctl00_ctl00_cph1_cph1_ctrlSearch_pnlAdvancedSearch').show();
}
else {
$('#ctl00_ctl00_cph1_cph1_ctrlSearch_pnlAdvancedSearch').hide();
}
}

</script>

<script type="text/javascript">
$(document).ready(function(){
$("#select-loc").live("click", function(){
$(this).closest(".sub-blocks").find("ul").toggle();
$('html, body').animate({scrollTop: $(this).offset().top-10}, 600);
return false;
});

$(document).click(function(e){
var myTarget = $("#select-loc");
var clicked = e.target.className;
if($.trim(myTarget) != '') {
if($(myTarget) != clicked) {
$("#select-loc").closest(".sub-blocks").find("ul").hide();
}
}
});

//price range slider code starts here
var arr = new Array(100,500,1000,5000,10000,20000,40000,60000,80000);
jQuery(document).ready(function() {

/* Price range slider code */
var minDefaultValue = 1;
var maxDefaultValue = 9;
var minValue = 1;
var maxValue = 9;

jQuery("#slider-range").slider({range: true,min: minValue,max: maxValue,step: 1,values: [minDefaultValue, maxDefaultValue],
slide: function(event, ui) {

jQuery("#amount").html(getValue(ui.values[0]) + ' to ' + getValue(ui.values[1]));
jQuery("#ctl00$ctl00$cph1$cph1$ctrlSearch$txtPriceFrom").val(getValue(ui.values[0]));
jQuery("#ctl00_ctl00_cph1_cph1_ctrlSearch_txtPriceTo").val(getValue(ui.values[1]));
}
});
jQuery("#amount").html("100 to 80,000");
});
function getValue(val){
return addCommas(arr[val-1]);
}
function addCommas(nStr) {
nStr += '';
var x = nStr.split('.');
var x1 = x[0];
var x2 = x.length > 1 ? '.' + x[1] : '';
var rgx = /(\d+)(\d{3})/;
while (rgx.test(x1)) {
x1 = x1.replace(rgx, '$1' + ',' + '$2');
}
return x1 + x2;
}

//price range slider code ends here

});
function focussed(obj)
{
if(obj.value==obj.defaultValue)
{
obj.value='';
$(obj).removeClass("itl");
}
}

function blurred(obj)
{
if(obj.value=='')
{
obj.value=obj.defaultValue;
$(obj).addClass("itl");
}
}
</script>

<div class="legs">
<span class="before"> </span>
<span class="after"> </span>
<div class="clearfix">
<div class="store-locator">
<span class="topic-header">Store Locations</span>
<div class="sub-blocks">
<p class="heading">28 Stores in 10 Cities</p>
<p>Running successfully for 6 years in India. Find a store nearest to you.</p>
Select Location
<ul>
<li>Ahmedabad</li>
<li>Baroda</li>
<li>Bengaluru</li>
<li>Chennai</li>
<li>Hyderabad</li>
<li>Mumbai</li>
<li>Nasik</l
Cibin Thomas Jacob 8-Oct-12 8:56am
   
This is the Footer.ascx user control. Where have you used this together with the master page?? may be u can edit your original question with html for Footer.ascx, three.Master and html of the Page where both are used together.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160919.1 | Last Updated 8 Oct 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100