473,804 Members | 2,205 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Webform issue with ASP.NET 2.0.

Hi,

I have migrated a web site from .NET 1.1.4322 to .NET 2.0. After the
migration my Modal webform does not work as it did in 1.1.

The webform pops up from a page when a user clicks a button:
The following line is run in the codebehind file:

Page.ClientScri pt.RegisterClie ntScriptBlock(t his.GetType(),
"imgExportToExc el_Click", "<script
language='JavaS cript'>window.s howModalDialog( 'ExportToExcel. aspx?ClientID="
+ ddlClients.Sele ctedValue + "&FromPeriod=1& ToPeriod=" +
ddlToPeriod.Sel ectedValue + "&BudgetYea r=" + intSelBudgetYea r + "',
null,'status:no ;dialogWidth:24 0px;dialogHeigh t:150px;dialogH ide:true;help:n o;scroll:no');</script>");

Both pages that run (both the startpage and the modal webform page) has
the @page directive enableEventVali dation="false".

On the modal webform page there are two buttons (servercontrols ) cancel
and ok, if the user presses ok, some lines are executed to create an
Excel spreadsheet with the help of a third-party serverside component
(Aspose.Excel).

Extract.....
Response.Conten tType = "applicatio n/vnd.ms-excel";
objExcel.Save(S ettings.ExcelSe ttings_FileName , SaveType.OpenIn Excel,
(Aspose.Excel.F ileFormatType) intExcelVersion , this.Response);
......

The code does exactly what it should do (give the user a question,
open/save dialog for the generated Excel file) if i remove the <base
target=_self></base> from the aspx page, but then at every post i make
a new window is opened.

Could someone please help me with this issue, i have tried changing
many things but i just cannot get it to work as it did in .NET 1.1.

Sincerely
/Hans Sixhöj

Jan 4 '06 #1
1 1449
Hi,

I have sloved the problem. Instead of implementing the <base
target=_self></base> tag to get the modal webform to post to itself and
not a new window I have now changed into using an <iframe:

<iframe
src="ExportToEx cel.aspx?Client ID=<%=Request.Q ueryString["ClientID"]%>&FromPeriod=1 &ToPeriod=<%=Re quest.QueryStri ng["ToPeriod"]%>&BudgetYear=< %=Request.Query String["BudgetYear "]%>"
name="embeddedF rame" width="100%" height="100%" scrolling=no />

This works perfectly and the serverside code executes and displays the
open/save dialog when i push the Excel document to the client.

The strange thing is why my original solution worked in ASP.NET 1.1 but
not in ASP.NET 2.0 - to this I have not found an answer.

Sincerely,
Hans Sixhöj

Jan 10 '06 #2

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

Similar topics

2
2161
by: Ester | last post by:
I would like to accomplish the following task in WebForm.aspx I have a SQL SELECT query that INNER JOIN two tables (Device_Tbl and Detail_Tbl) which will return Device_BtnID Status Z_Index Left_Px Top_Px On_Img Off_Im ImgBtnLight 0 102 192px 72px image\light_on.gif image\light_off.gi ImgBtnAC 0 102 192px 72px image\ac_on.gif ...
2
1776
by: *no spam* | last post by:
I'm trying to figure out how to create a tabControl in a WebForm (I'm a newbie - sorry if this is a dumb question :) I've been able to set it up in a Windows Form, but would prefer to get it working directly in the WebForm. a) Is it possible to do? b) If it is, can an anybody point me to some VB code to do it? Pls reply to the newsgroup - in case anybody else has the same issue. Thx
3
1852
by: Prasad Patil | last post by:
Hi, I have a webform, The link on the webform should call the exe program installed on the client machine when the user click the link on the webform. It should run the exe installed on the client machine. I am not able to run the client application from my webform. Any suggestions or link would be great help. Thanx Prasad
2
8407
by: Hazzard | last post by:
I just realized that the code I inherited is using all asp.net server controls (ie. webform controls) and when I try to update textboxes on the client side, I lose the new value of the textbox when submitting the form to update the database. The server doesn't have the client side value any more. It seems to me that as I begin to write the client side javacript code for form validation and client side editing capabilities in order to save...
0
1084
by: Lauchlan M | last post by:
<< Compiler Error Message: CS1595: 'myWebInterface.X.Y.AddEditUsers' is defined in multiple places; using definition from 'e:\WINNT\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\mywebinterface_nexusdb\fe7356c1\5423ab61\assembly\dl2\24513897\98a5084 2_0255c401\myWebInterface_NexusDB.DLL' >> It seems to be having an issue with every file in the project over this.
0
1079
by: Lauchlan M | last post by:
<< Compiler Error Message: CS1595: 'myWebInterface.X.Y.AddEditUsers' is defined in multiple places; using definition from 'e:\WINNT\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\mywebinterface_nexusdb\fe7356c1\5423ab61\assembly\dl2\24513897\98a5084 2_0255c401\myWebInterface_NexusDB.DLL' >> It seems to be having an issue with every file in the project over this.
2
1395
by: Craig Douthitt via DotNetMonster.com | last post by:
I am trying to capture an buttonclick on a usercontrol in the webform the usercontrol resides in. After researching this issue, I've come to believe that the best way of handling this is by raising an event in the control and consuming the event in the webform. I tried the following, unfortunatly while the usercontrol raises the event the webform method does not react. UserControl (Named WebUserControl1 contains one button) Public...
2
1051
by: syncwa | last post by:
Hi, Can someone point me to a example on how to do this from asp.net? An example is the best. Thanks
5
1748
by: James Radke | last post by:
Hello, I am using VB.NET to call an unmanaged DLL which contains some functions. When I call the DLL from a windows application, it all works fine. When I place the same code in a webform application, my call to the first initialization routine simply hangs (i.e. in debugger it shows the code starts executing, but control never comes back to the debugger). This DLL uses the MFC42.DLL and MSVCRT.DLL which is in the WINNT/SYSTEM32...
0
9715
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9595
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10600
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10352
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10097
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7642
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5673
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4313
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3835
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.