6 Replies - 5067 Views - Last Post: 25 November 2009 - 10:43 AM Rate Topic: -----

#1 PsychoCoder  Icon User is offline

  • Google.Sucks.Init(true);
  • member icon

Reputation: 1641
  • View blog
  • Posts: 19,853
  • Joined: 26-July 07

User control with Master Page

Posted 13 November 2009 - 10:12 AM

I have a simple user control (country/state or region selector) that works beautifully when tested on a normal page. The problem I'm having is it doesn't work (nothing happens when selecting a country) when placed on a page inside a Master Page.

It's a simple control, 2 DropDownLists and an Update Panel. If I drag it onto a normal page (no Master Page) it doesn't exactly what it's intended to do (populates states/regions based on what country is selected without a PostBack), but in the page I need it to work in (with Master Page) it doesn't do anything when I select a country.

Anyone ran into an issue like this and know how to resolve it.

P.S: I haven't posted any code because I do not believe it has any bearing on why it doesn't work with a Master Page. If someone needs to see some of it just let me know :)

Is This A Good Question/Topic? 0
  • +

Replies To: User control with Master Page

#2 krazyk  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 9
  • Joined: 22-May 09

Re: User control with Master Page

Posted 14 November 2009 - 12:23 AM

hey friend


i had created same as u mentioned ..

dropdownlist control for country/state/city


i had also used it inside the master page....

it worked fine with me...

just check the SelectedIndex change event...


do u want the code let me knw...will send u..
Was This Post Helpful? 0
  • +
  • -

#3 PsychoCoder  Icon User is offline

  • Google.Sucks.Init(true);
  • member icon

Reputation: 1641
  • View blog
  • Posts: 19,853
  • Joined: 26-July 07

Re: User control with Master Page

Posted 18 November 2009 - 11:50 AM

@krazyk The user control is coded, and works fine within a normal web form, the issue I'm having is using the user control in a web content form (which utilizes a master page), that is when it stops working.
Was This Post Helpful? 0
  • +
  • -

#4 krazyk  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 9
  • Joined: 22-May 09

Re: User control with Master Page

Posted 19 November 2009 - 12:08 AM

hey friend,


the same way i had created...and also giving me the result...


can i see ur code?...
Was This Post Helpful? 0
  • +
  • -

#5 PsychoCoder  Icon User is offline

  • Google.Sucks.Init(true);
  • member icon

Reputation: 1641
  • View blog
  • Posts: 19,853
  • Joined: 26-July 07

Re: User control with Master Page

Posted 24 November 2009 - 10:21 PM

Ok, if I dont have anything in the QueryString when the page loads the control works wonderfully. Anyone know why if there's anything in the QueryString the control doesn't work?
Was This Post Helpful? 0
  • +
  • -

#6 Jayman  Icon User is offline

  • Student of Life
  • member icon

Reputation: 418
  • View blog
  • Posts: 9,532
  • Joined: 26-December 05

Re: User control with Master Page

Posted 25 November 2009 - 10:25 AM

Does not compute. :)

The QueryString should have no impact on the usability of controls.

I'd be curious to see what you got going on that could be causing so much trouble with this user control.

Is the user control being loaded dynamically in the code behind?
Was This Post Helpful? 0
  • +
  • -

#7 PsychoCoder  Icon User is offline

  • Google.Sucks.Init(true);
  • member icon

Reputation: 1641
  • View blog
  • Posts: 19,853
  • Joined: 26-July 07

Re: User control with Master Page

Posted 25 November 2009 - 10:43 AM

Sorry I opened a new thread since it's actually a new issue. The user control is being loaded in the markup

<%@ Register src="~/Controls/CountrySelector.ascx" tagname="CountrySelector" tagprefix="ccp" %>

//then
<tr>
	<td colspan="3">						   
		<ccp:CountrySelector ID="CountrySelector1" runat="server" />
	</td>
</tr>



I created a test page with the Master page, added values to the QueryString (manually once the page loaded) and it worked fine. Can this be caused since I'm loading the page with Thickbox (same as Lightbox)?
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1