GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Microsoft  >  Mixed
Go To First  |  Previous Question  |  Next Question 
 Mixed  |  Question 38 of 42    Print  

Hi,,

I have two User Controls in my web form. When page loads I should view one of those controls. One button is also there in that page When i click that button then i should view other one.

How to do that.? I got it by changing AutoEventWireUp="True" of the page... Any other alternative for this?

Please let me know..

Thanks in Advance..

Ravi Majji..

  
Total Answers and Comments: 2 Last Update: December 20, 2007     Asked by: Ravi Majji 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
August 26, 2006 09:18:49   #1  
rahul        

ur ans i guss
If not mistaken i guss u should put 2 countrols in the page load and one in the form load.If my answer is wrong forgive me.

Rahul


 
Is this answer useful? Yes | No
December 20, 2007 17:30:53   #2  
whirlpool Member Since: December 2007   Contribution: 3    

RE: Hi,, I have two User Controls in my web form. When page loads I should view one of those controls. One button is also there in that page When i click that button then i should view other one. How to do that.? I got it by changing AutoEv
Try using

Page.loadControl(virtualpath)

virtualpath path of the2 nd user control.

then add the user control to the placeholder control that u have declared on the form

something like;

protected void btn1_Click(object sender EventArgs e)
{

string files Path.GetFileName("~/usercontrol2.ascx").ToString();
Control getcontrol Page.LoadControl(files);
PlaceHolder1.Controls.Add(getcontrol);

}


Hope it helps!!

 
Is this answer useful? Yes | No

 Related Questions

Latest Answer : There are basic three tags for HTML form:1) ID2) action3) methodeg: ...

Hi,, I have two User Controls in my web form. When page loads I should view one of those controls. One button is also there in that page When i click that button then i should view other one. How to do that.? I got it by changing AutoEventWireUp="True" of the page... Any other alternative for this?Please let me know..Thanks in Advance..Ravi Majji..
Read Answers (2) | Asked by : Ravi Majji


 Sponsored Links

 
Related Articles

jQuery - Marking the Current Page

Learning jQuery Marking the Current Page Our pager can be made more user friendly by highlighting the current page number We just need to update the classes on the buttons every time one is clicked mosgoogle geshibot lang php" var pager ; for var page 0; page numPages; page pag
 

What is a view

A view is nothing but a window of an existing table by which one can view and can also change the values in tables. The main point aspect of view is views have no storage space. For this reason views are also called as virtual tables. Thus in other words a view is a database object that gives a logi
 

The Interview Snafu

How to turn someone else’s mistake to your advantage Your dream job is about to become reality. A recruiter gave you the heads up about the perfect position at Humungous Conglomerate, Inc. You went through five interviews as well as a battery of psychological tests mandated by their HR de
 

Effective Controls for Attaining Continuous Application Security

Effective Controls for Attaining Continuous Application Security Throughout the Web Application Development Life Cycle Given the choice, every organization would want secure Web sites and applications from the Web application development phase all the way through the software development life cycle.
 

Winning a Job Interview with a Winning Resume

Does your resume unlock your potential, take your skills to the highest level and win you the interview and the job you want now? The job market today is highly competitive and even if you think you have what it takes to get an interview you won’t get over the line without a polished, prof
 

Maximizing Transferable Skills When Changing Career

Changing career entails daunting tasks and activities that an individual needs to accomplish in order to be successful in his new chosen career. Career shift requires a lot of preparation on the part of the individual especially if the new career is very different from his previous employment experi
 

Tried and True Resume Writing Rules

You can have all the experience, personality, and credentials you need to land the best jobs in any area of the world, but if you don’t know how to put them onto paper in the form of a resume, you may be unemployed. Writing a resume isn’t as simple as scribbling down your past ex
 

Importance of Proper English during Job Interview

Importance of Proper English during Job Interview Your job interview is crucially important and it will determine whether or not you will get the job Depending on the type of job you re going for it is very important for you to use proper English In most cases jobs which offer higher salaries will h
 

JavaScript Form Object

JavaScript Form Object In this JavaScript Tutorial you will learn about JavaScript form object properties of form object action elements encoding length method name target button checkbox FileUpload hidden password radio reset select submit text textarea and methods of form object mosgoogle Form Obj
 

JSP Page Directive

JSP Page Directive In this JSP tutorial you will learn about JSP page directive attributes of the page directive along with syntax examples and explanations mosgoogle autoFlush autoFlush  attribute is used to specify whether or not to automatically flush out the output buffer when it is ful
 

About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape