Wrox Programmer Forums
|
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 9th, 2006, 04:24 AM
Registered User
 
Join Date: May 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default C# / ASP

Hi there,

Can anyone help out with a simple thing but bear in mind I am a novice. I have a problem trying to implement dropdownlist selection dependant form content. I have a dropdownlist control which declared as: id="DropDownList2" runat="server" AutoPostBack="true" onSelectedIndexChanged="ChangeContent", where ChangeContent is a protected method written in C#. The whole thing works and when I change the dropdown selection the required information is displayed correctly but the problem is that instead of displaying everything on the same window it launches a second one which is bigger (where size comes from?) and sits on top of the whole application. Ideally I want it to work similar to windows application where you can change selection and everything happens without reloading the form if this is not possible then at least help me to get rid of the second window.
I would appreciate any contribution.

Janette.

 
Old May 11th, 2006, 03:56 PM
Authorized User
 
Join Date: May 2006
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The default behavior of AutoPostBack is to run everything through the same window. My initial thought is that a client-side function is being called at some point in the process that is opening a new window. It could also be happening in the ChangeContent C# function.

Does the new window appear after the original page has posted and redrawn or before?

It is possible to do "asynchronous callbacks", which make the Web application seem to work just like a Windows application. This is an advanced topic, but not out-of-reach. The Wrox Professional ASP.NET 2.0 book has a nice example of this in Chapter 23.

Brandon
 
Old May 12th, 2006, 05:15 AM
Registered User
 
Join Date: May 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you Brendan,

I have actually managed to solve the problem. I have overlooked one small silly thing it was <base target=_self> in the <HEAD> section. When I added it my window started working fine.
But thanks anyway for the reply.

Janette.






Similar Threads
Thread Thread Starter Forum Replies Last Post
send parameters from asp page to an asp.net form hastikeyvan ASP.NET 1.0 and 1.1 Basics 2 March 29th, 2008 01:32 AM
using asp.net web user control in asp 3.0 App i_shahid Classic ASP Professional 0 January 8th, 2008 07:32 AM
Custom HTTP 404 Problem w/ASP to ASP.NET kwilliams ASP.NET 2.0 Professional 7 November 26th, 2007 04:17 PM
Upgrading ASP w/ SQLserver 2000 to ASP.NET w/2005 cJeffreywang ASP.NET 2.0 Basics 1 April 5th, 2007 11:30 PM
Porting a sa,ple ASP CR viewer app to ASP.NET jhansen42 Crystal Reports 0 August 29th, 2003 10:26 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.