.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

What event (if any) is fired on calling ShowDialog on hidden window

Posted By:      Posted Date: September 14, 2010    Points: 0   Category :WPF
I initialize a window at the launch of my application and hide it, so that when the user needs to launch it I can quickly show it. I am using showDialog to show the window. I use this window at multiple places. So when the user is done using the window I again hide it. My question is how does the window know that it is visible. 'Loaded' event is no longer fired when I can ShowDialog to show the window. ('Loaded' event is fired the first time I create the window and hide it). Is there any other event that is fired on calling 'ShowDialog' on a hidden window? Thanks for your response.  

View Complete Post

More Related Resource Links

dont show JS hidden row after server event fired


Hi all,

i designed a gridview named outergrid and within that GV i designed a innerGrid, when the user click on expand button from the outergrid then the inner grid have to show. Now im doing some row filter works using JS, let us assume i have 5 rows in outergrid after filtered first 2 rows will be hiden so now 3 rows displaying, when user clicks on the expand button then im calling RowCommand Event of outergrid now the child grid has populated but the problem is 2 hiden rows(on outergrid) are now visible, how to make these hiden rows not to show while populate innergrid.

way of calling "javascript function of parent window from child window."

The article way of calling "javascript function of parent window from child window." was added by raja.s on Sunday, June 06, 2010.

Hi,Here i am going to explain how to call the javascript function of a parent window from the child window(pop-Up).Some may know before reading this post.Parent Java Script Function:script language="Javascript" type="text/javascript">

Closing Javascript Modal dialog window after server side event processing


Hello Friends..

Please tell me how to close Javascript ModelDoalog Window.. after Server Side event Processing .

Basically i want close window in  finally Block After sucessfulll Updation.

AMit..... InnocentInnocentInnocentInnocentInnocentInnocentInnocent

Binding an event method from a control in a seperate window

How would you bind a event method from a control back to a seperate window?  I have a ActiveX control hosted in a WindowsFormsIntegration wrapper.  That is operating in its own window along with all its events.  The properties of the control are handled by a class that defines the dependency objects (thanks Bob) to provide a view model between it and a window with controls for setting/getting those properties.  Since events constrained to Window 2, is it possible to bind the events back to Window 1?

Button click event is not fired on button click

 Hi am using jquery flexi gride in web page and it is working fine .But now the problem is ocured when i click button to call server side event.I am not able to find out .Please guide me for this My button is as fallows and i am<asp:Button ID="btnExport" runat="server" Text="Export" Style="font-family: 'Times New Roman', Times, serif" OnClick="btnExport_Click" />  

How to retrieve object that fired Command event.

Hi there, My situation is, I have a button that bind with a custom ICommand. When the button is clicked, the "CanExecute()" in the custom ICommand will be execute. The question is, how can I retrieve the button object inside "CanExecute()" ? Thanks. Regards, Rambo Ong

Calling a button's click event from another buttons click event

I have a button that checks the users serial number entry in a web form and a button that subits the page.  But if the user does not click the checkbutton  I want to  fire the check click event  from the pages submit click event.  Is this possible.  In my submit click event I call this Me.cmdCheck_Click(sender,e) though it does not seem to be firing the click event is there something that I am doing wrong?  

Viewstate issue when calling button click event from Javascript

I have a javascript that asks a confirmation on search click. If the user has made some changes to the data in grid (gridview) on click of Search, a confirmation is asked to Save or Continue Search. If Yes, Save the records by invoking Save click from javascript. If No, Search click is invoked. While Search click happens correctly, Save click results in an error which reads like this..  "Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster. " I know the Viewstate is what causing the problem, where the control is not loaded but script is trying to invoke it's click event. Any help is appreciated. At the end of the day, all i need is to invoke Save click from javascript.   -- Viswanth VG  

No CacheMiss Event When Calling SP With No Owner - Applies to 2005?

Hi, As outlined in knowledge base article 263889 (Description of SQL Server blocking caused by compile locks http://support.microsoft.com/kb/263889) it says you should specify the owner when calling a stored procedure to reduce compile locks.  I've tried this out in SQL Server 2000 by calling a stored procedure without an owner.  As expected in the profiler I can see a CacheMiss then a ExecContextHit. However, if I try exactly the same thing in SQL Server 2005 I never see a CacheMiss event (unless the execution plan needs to be created), I always see a CacheHit first.  Is this something that's been improved in SQL Server 2005?  The knowledge base article says it applies to 2005 at the foot of the page but I can't see it. Thanks for your help.  

ItemAdded event not getting fired

Hi, I have ItemAdded event created. I have added a function in that. The function counts the number of files in the subfoldes of the list. I have build the class file, and created it as a feature and activated the feature. I am not sure if my code is being hit. This is the code i have used. [CODE] namespace ItemCountEventHandler {     class Constants     {         public const string url = "Server Name";         public const string listname = "list name";     }     public class ItemCounting : SPItemEventReceiver     {         public override void ItemAdded(SPItemEventProperties properties)         {             //   base.ItemAdded(properties);             GetOpenItems();         }                   public static void GetOpenItems()         {             using (SPSite site = new SPSite(Constants.url))     

Will Session_End event will be fired evenif somebody directly closes browser without sign out?

Hi,     In one of my application I m using InProc session state.Can anybody tell me if user closes the browser directly,then Session_End will be called? Regards, Mehul

Send values to parent window on gridview click event


Hello all,

I have a form, which contains 2 textboxes. When i click on the first textbox, i have to open a child window (tool), that contains a gridview control with 2 columns (corresponding to the 2 textboxes). When the user clicks on any row in the gridview, it should send back the 2 column values back to the parent window to the corresponding 2 textboxes. Can anyone help me on how do i achieve this?

I can open the child window and get back the values using window.opener method in JS. 

But can anyone help on how to bind the JS code to the onClick of every row in the gridview. How can i activate the OnClick event of every row/alternating row item of the gridview and bind the JS code and pass each column value to that JS method? The no of columns in the gridview can vary depending upon the data? So in that case, i have to have a collection to be passed to JS code that can contain n number of column values.

Please help.

Unexpected window.open Event


I have a small amount of experience with ASP.Net and I have inherited a project that has gone through many hands. I'm not sure if anyone can help me on this, but here goes. 

I have an .aspx page (Home.aspx) with an image button (ibEdit) and a link button (btnEditExpiration). The image button was created by another developer before I inherited the project. It is designed to reveal a hidden part of the page, with fields to edit customer information. I have added the link button to open another form  (EditExpirationDates.aspx), populated with information from Home.aspx 

When I click on ibEdit, everything works as expected. When I click on btnEditExpiration everything works as expected. The problem arises after I click on the btnEditExpiration button. Thereafter, every time I click on ibEdit , it's as if both click events fire and the EditExpirationDates.aspx form opens .

If I close the page and reopen it everything works fine until I click the btnEditExpiration.

Any suggestions would be appreciated.

Code shown below:


Exception thrown when handling Window.Loaded event


Why is the exception assistant not "fired" in a debugging session when a Window.Loaded eventhandler calls code which throws an exception ?
        private void Window_Loaded(object sender, RoutedEventArgs e)
            //Application.Current.DispatcherUnhandledException +=
               new System.Windows.Threading.DispatcherUnhandledExceptionEventHandler(Current_DispatcherUnhandledException);
            int a = 1;
            int b = 0;
            int c = a / b;

        void Current_DispatcherUnhandledException(object sender, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e)

Removing the comment signs (//) thus presenting an UnhandledException handler devinately makes the assistant "firing".
Is this behaviour by desi

Calling Popup window from another Popup window


Hello everybody.

I want to call a popup window say win2 from another popup window win1.

The calling of win1 is :

<script type="text/javascript">
function openPopUp(){
               window.open("LeaveApplicationForm.aspx", "Leave Application Form", "status = 1, height = 800, width = 600"); } </script>

And in page load :

SubmitButton.Attributes.Add("onclick" , "openPopUp()");

This is working fine.

Now for win2 the calling function is :

try {              
              Response.Write("<script language='javascript'> { window.open('EmailSendReport.aspx?Report=Success','Email Report Form', 'status = 1, height = 500, width = 500');}</script>");
} catch (Exception) {

Open a new Window on Button_click event


Hello, I am learning Visual Studio 2008 on the fly.

I'd like to get a help on how to open a new window when the report is opened for view.


1. Populate the asp:DropDownList to fill PDF file names

2. Select the report and click asp:Button

3. Pop a new window to browse the PDF file.

1 and 2 are working fine but for #3 - the report shows up but I can't goback to Home page unless i kill the window and restart the App or use the back button on IE.

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click

    Dim org = "C:\Documents and Settings\My Documents\PDF\"


Calling Button,s onclick event in javascript code


 Hi Experts.

I have a Button control in webpage.

<asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" OnClientClick="test()"/>

When i click on button, i want to check some conditions

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend