473,779 Members | 2,078 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

C# Web-App: Persisting Title of Modal Dialogbox during Postback

3 New Member
Hi All,

I am using ASP.NET 2.0 and C#.

I am opening a Modal Dialog Box from .aspx page.

This dialgo box contains a grid and user can add new recod to this grid from here.

When this dialgo is opend fist time everything works well.

If I add new record on this dialog box which postbacks the page which is contained within the dialog I lost the "Title" of the popup dialog.

I tried to set the "title" on .asp page/Page_Load event but unable to presist the Title of Modaldailog box on Postback.

Regards,
Virendra Jhala
Dec 3 '07 #1
4 3340
Frinavale
9,735 Recognized Expert Moderator Expert
Hi All,

I am using ASP.NET 2.0 and C#.

I am opening a Modal Dialog Box from .aspx page.

This dialgo box contains a grid and user can add new recod to this grid from here.

When this dialgo is opend fist time everything works well.

If I add new record on this dialog box which postbacks the page which is contained within the dialog I lost the "Title" of the popup dialog.

I tried to set the "title" on .asp page/Page_Load event but unable to presist the Title of Modaldailog box on Postback.

Regards,
Virendra Jhala
Hi Virendra,


You can set the page's title in the <%@ Page ..%> directive...
Eg:

Expand|Select|Wrap|Line Numbers
  1. <%@ Page Language="vb" AutoEventWireup="false" MasterPageFile="~/MasterPage.master" CodeBehind="Index.aspx.vb" Inherits="MyNamespace.Welcome" title="My Title" %>

Have you tried using globalization to set your title's and prompts?
For instance the following will go to the resource file (.resx file) for this page and automatically set the title...
Expand|Select|Wrap|Line Numbers
  1. <%@ Page Language="vb" AutoEventWireup="false" MasterPageFile="~/MasterPage.master" CodeBehind="Index.aspx.vb" Inherits="MyNamespace.Welcome" title="My Title" Culture="auto" meta:resourcekey="PageTitle" UICulture="auto"  %>
This will also grab the culture specific title for the page...eg...if someone were coming to your website and their browser's culture was set to "es-mx", your website will automatically look for a Spanish (Mexico) resource and fill the page's title with this text.

If this isn't the type of answer you're looking for let me know....

-Frinny
Dec 3 '07 #2
jhalavirendra
3 New Member
Hi Frinny,

After posting this issue I did try the first option of setting up the Title in @Page directive but it did not work.

I am using IE 6.0 on Windows XP.

The application does not have anything on Globalization front so I did not attempt your second option.

It seems that there is something inherent in web dialog which is causing this behaviour.

Let me know in case you have anything else.

Here is the sample code I am using for opening the popup on a Html button click.

window.showModa lDialog("commen t.aspx",'','res izable:no;
status:no;dialo gWidth:420px;di alogHeight:320p x;');


I tried setting up the "Title" in following ways:

1. Passed the argument in the showModalDialog function
2. On the .aspx page <Head><Title> </Title></Head>
3. In code behind..Page_Lo ad..this.Title = "Mytitle"
4. In the Page directive

Regards,
Virendra Jhala


Hi Virendra,


You can set the page's title in the <%@ Page ..%> directive...
Eg:

Expand|Select|Wrap|Line Numbers
  1. <%@ Page Language="vb" AutoEventWireup="false" MasterPageFile="~/MasterPage.master" CodeBehind="Index.aspx.vb" Inherits="MyNamespace.Welcome" title="My Title" %>

Have you tried using globalization to set your title's and prompts?
For instance the following will go to the resource file (.resx file) for this page and automatically set the title...
Expand|Select|Wrap|Line Numbers
  1. <%@ Page Language="vb" AutoEventWireup="false" MasterPageFile="~/MasterPage.master" CodeBehind="Index.aspx.vb" Inherits="MyNamespace.Welcome" title="My Title" Culture="auto" meta:resourcekey="PageTitle" UICulture="auto"  %>
This will also grab the culture specific title for the page...eg...if someone were coming to your website and their browser's culture was set to "es-mx", your website will automatically look for a Spanish (Mexico) resource and fill the page's title with this text.

If this isn't the type of answer you're looking for let me know....

-Frinny
Dec 3 '07 #3
Frinavale
9,735 Recognized Expert Moderator Expert
Hi Frinny,

After posting this issue I did try the first option of setting up the Title in @Page directive but it did not work.

I am using IE 6.0 on Windows XP.

The application does not have anything on Globalization front so I did not attempt your second option.

It seems that there is something inherent in web dialog which is causing this behaviour.

Let me know in case you have anything else.

Here is the sample code I am using for opening the popup on a Html button click.

window.showModa lDialog("commen t.aspx",'','res izable:no;
status:no;dialo gWidth:420px;di alogHeight:320p x;');


I tried setting up the "Title" in following ways:

1. Passed the argument in the showModalDialog function
2. On the .aspx page <Head><Title> </Title></Head>
3. In code behind..Page_Lo ad..this.Title = "Mytitle"
4. In the Page directive

Regards,
Virendra Jhala
Could you please post your <%@ Page %> directive.
When I tried:
Expand|Select|Wrap|Line Numbers
  1.  window.showModalDialog("Index.aspx", "", 
  2.       "resizable:no;status:no;dialogWidth:420px;dialogHeight:320px")
It worked fine....

-Frinny
Dec 3 '07 #4
jhalavirendra
3 New Member
Could you please post your <%@ Page %> directive.
When I tried:
Expand|Select|Wrap|Line Numbers
  1.  window.showModalDialog("Index.aspx", "", 
  2.       "resizable:no;status:no;dialogWidth:420px;dialogHeight:320px")
It worked fine....

-Frinny
Hi Frinny,

Here is the page directive of my page.

<%@ Page Language="C#" AutoEventWireup ="true" CodeFile="OpsCo mments.aspx.cs"
Inherits="MyCom pay.Web.UI.OpsC omments" title="My Page" %>

I can see the Title once the modal is opened first time from detail page.

Now I can add new record in this modal by entering some values and hitting Submit button which does a postback on the same popup.

After Postaback I can see the newly added record in the List Grid but the modal dialog is unable to presist the Title.

Regards,
Virendra Jhala
Dec 3 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

2
528
by: PatrickSA | last post by:
Hi, Am new to web services, so apologies for the basic nature of the question - and apologies in advance if this is the wrong newsgroup. We're building a new web service and I'm looking around for documentation on a number of issues, including versioning of web service interfaces... I've spent the last few hours looking through books, Google, MSDN and surprisingly I have found little or nothing that explains/shows how to practically...
8
3151
by: John Baker | last post by:
Hi: I am URGENTLY in need of some book or web site OR tool that will help me integrate a relatively simple access application into a web page or pages. This is a time recording system (by project), and I would be more than wiling to pull the updated database down from the Host using FTP on a monthly basis. Its just that I need to understand how to set it up on the web site itself. The Host supports SQL. Any direction you can give would...
0
2095
by: Erick Lopez | last post by:
When I send my web page to browser in ouput windows recibe this message and the web page the error BC32400 Please Help me Auto-attach to process ' aspnet_wp.exe' on machine 'TABLET' succeeded. 'DefaultDomain': Loaded 'c:\windows\microsoft.net\framework\v1.1.4322\mscorlib.dll', No symbols loaded. 'DefaultDomain': Loaded 'c:\windows\assembly\gac\system.web\1.0.5000.0__b03f5f7f11d50a3a\system.web.dll', No symbols loaded. 'DefaultDomain':...
5
2439
by: Michael Herman \(Parallelspace\) | last post by:
1. What are some compelling solutions for using Master/Content pages with Web Pages? 2. If a content area has a web part zone with web parts, what is the user experience like when "editting" the web part page? Does it take place at the page level? ...or the content area level? 3. Where is the Web Part Manager instantiated? ...in the Master Page? ....Content Page? ...elsewhere?
0
3007
by: pd123 | last post by:
I'm new to C# and .net and I'm trying to create a form that will register users in a sql server database. I have the following code but when I run the code I get an error " The name 'Peter' is not permitted in this context. Only constants, expressions, or variables allowed here. Column names are not permitted. Where Peter is the value entered in the textbox for firstname (fnameTBox) I'm sure the problem is something obvious but I...
7
6541
by: Jonas | last post by:
Hi. I'm trying to develop a web custom control that uses a programmatically created treeview. My problem is that I get an exception when I try to render the control. With properties do I have to assign to get this working. Here is some sample code: namespace WebControlLibrary1 {
2
14379
by: job | last post by:
In a sharepoint setup using smartpart to load our user controls using enterprise blocks (data) we are getting some strange errors (logged to the event log). We dont get the error all the time. When we get the error CPU goes 100% We have been through all we can think of, but have not been able to locate the source to the error. Any suggestions?
3
13806
by: =?Utf-8?B?RGFuZGFuIFpoYW5n?= | last post by:
Now I have a web application, a web service and a SQL Server database. The Web application will invoke the web service, the web service invokes the SQL Server stored procedure. I let the web service run in an application pool which runs under a domain user, this domain user has permissions of accessing database and the connection to database is trusted connection. All these work well. The web application will be used in internet (not...
20
6753
by: =?Utf-8?B?cmtibmFpcg==?= | last post by:
I was executing the steps given in http://suppor.microsoft.com/kb/308359 for testing a sample web service application. However, the following line gives a compilation error: localhost.Service1 xxx = new localhost.Service1(); localhost is not recognized by the compiler.
2
7397
by: =?Utf-8?B?YW5vbg==?= | last post by:
I am not sure if this is the right forum. Environment : Windows server 2008, IIS 7.0 I get the 'Could not load the file or assembly 'blowery.web.httpCompress' or one of its dependencies. The system cannot fond the file specified error. When I comment out the line in the web config file, I get the error on the line following that. I have all the dll files in the bin folder.
0
9474
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
10306
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...
1
10075
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9931
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...
0
8961
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7485
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...
1
4037
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
3632
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2869
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.