473,403 Members | 2,366 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

Events fired on localhost, not on remote machine

Hi,

I have a asp.net application in which there is a listbox and a button. When
the user selects an item and presses a button, I want to get the
selectedindex of the item. This application works fine when built and run on
localhost.

I copy the same project on a remote machine, open the project remotely from
my local machine, build it from my local machine to the bin folder on the
remote machine. When I run the same code on the remote machine, listbox
selectedindexchanged event does not fire, and the selectedindex is always -1,
moreover the items in the listbox are lost.

It has been days and I cannot resolve this issue, I'll appreciate any help.

Thanks in advance,
Bilge Gul

Nov 19 '05 #1
2 1999
Hi Bilge,

This seems like a viewstate issue. Did you check if the Web.Config or
Machine.Config files have disabled the viewstate?

The event of dropdown cannot be fire if the control do not have viewstate
[The event is fired if the posted value is different from the previous
values stored in the viewstate]. It is also a side effect to loose all data
after a postback.

--------------------------
Jean-Claude Morin, MCP
Software Developer
2k1Soft/kCentric, Canada
"b_gul_t" <bg***@discussions.microsoft.com> wrote in message
news:DD**********************************@microsof t.com...
Hi,

I have a asp.net application in which there is a listbox and a button. When the user selects an item and presses a button, I want to get the
selectedindex of the item. This application works fine when built and run on localhost.

I copy the same project on a remote machine, open the project remotely from my local machine, build it from my local machine to the bin folder on the
remote machine. When I run the same code on the remote machine, listbox
selectedindexchanged event does not fire, and the selectedindex is always -1, moreover the items in the listbox are lost.

It has been days and I cannot resolve this issue, I'll appreciate any help.
Thanks in advance,
Bilge Gul

Nov 19 '05 #2
Yes this solved the problem:) Previously I was checking the web.config file
in my virtual directory and was not able to find anything in it related to
the viewstate. Then I searched all web.config files under the inetpub\wwwroot
and there was one exactly in inetpub\wwwroot which contained a
enableviewstate=false directive. So I added the same line to my own virtual
directory but this time with enableviewstate=true. And now I can catch the
events and get selectedIndex:))

"Jc Morin" wrote:
Hi Bilge,

This seems like a viewstate issue. Did you check if the Web.Config or
Machine.Config files have disabled the viewstate?

The event of dropdown cannot be fire if the control do not have viewstate
[The event is fired if the posted value is different from the previous
values stored in the viewstate]. It is also a side effect to loose all data
after a postback.

--------------------------
Jean-Claude Morin, MCP
Software Developer
2k1Soft/kCentric, Canada
"b_gul_t" <bg***@discussions.microsoft.com> wrote in message
news:DD**********************************@microsof t.com...
Hi,

I have a asp.net application in which there is a listbox and a button.

When
the user selects an item and presses a button, I want to get the
selectedindex of the item. This application works fine when built and run

on
localhost.

I copy the same project on a remote machine, open the project remotely

from
my local machine, build it from my local machine to the bin folder on the
remote machine. When I run the same code on the remote machine, listbox
selectedindexchanged event does not fire, and the selectedindex is

always -1,
moreover the items in the listbox are lost.

It has been days and I cannot resolve this issue, I'll appreciate any

help.

Thanks in advance,
Bilge Gul


Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: amit.purohit | last post by:
hi, I have a very strange problem on my login Page. the Page was working fine a few days back, but now does not generate post back events for controls. this login page uses form based...
14
by: JPRoot | last post by:
Hi I use the following syntax to have events inherited from base to child classes which works nicely (virtual and override keyword on events). But I am wondering if it is a "supported" way of using...
1
by: Tim | last post by:
I have an asp.net application that generates dynamic images (charts). When I run the application in debug mode from visual studio, or refer to the url with localhost in the name, everything works...
2
by: Jeff | last post by:
Hi - I have an ASP.NET web page accessing a SQL database. It works fine on the web, and I'm trying to get it to also work in debug mode in the IDE. The "on the web" page and my SQL database...
6
by: Brad | last post by:
I have a win2003 server workstation with multiple webs, each web has it's own ip address. In VS2005, if I select to open an existing web site, select Local IIS, the dialog correctly displays a...
0
by: hmm | last post by:
Hi all I have two problems: Problem #1: I'm using a .NET Form with the property 'FormBorderStyle' set to 'None'. The idea is to completely cover the area of that Form with a UserControl. In...
3
by: maciek kanski | last post by:
Hello I have running WCF service (config below) hosting in just console application - because I've used InstanceContextMode.Single and ConcurrencyMode.Multiple and no Throttling I expect that 10...
10
by: Martijn Mulder | last post by:
A general question and a specific one. 1. Is there a Spy utility that shows events for a .NET application 2. What events are fired when calling Form.Show() ?
12
by: Jonathan Wood | last post by:
Greetings, I wonder if anyone can help me with this. I have an XP laptop, and a Vista desktop computer. I use the laptop to run software remotely on the desktop using the Remote Desktop...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.