Sunday, 11 September 2016

Set UserControl Value On click of Button Present in another UserControl

Inline image 1Inline image 2


Write Below Code in UserControl1 

<%@ Reference VirtualPath="~/Control2.ascx" %>


On Button Click

 Control2 ctrlA = (Control2)Page.FindControl("Control_2");//Control_2 is the tagName that is used for Control2 in the aspx Page
 TextBox ddl = (TextBox)ctrlA.FindControl("txtResult");
//txtResult is the Textbox id Present in Control2
 ddl.Text = txtusername.Text;

6 comments:

  1. Nice blog, keep writing like this

    Buy Milwaukee at low prices in UK. Select from range of home improvement tools & Milwaukee UK of all brands from tools4trade.co.uk

    Milwaukee
    Milwaukee UK
    Milwaukee Power Tools
    Milwaukee Fuel
    Milwaukee UK Cordless
    Corded Power Tools
    Milwaukee power tools UK

    ReplyDelete

  2. Nice your Blog

    Massive Male Plus UPDATE 2020 – Does It Really Work?

    https://k12.instructure.com/eportfolios/7387/Home/Massive_Male_Plus_UPDATE_2020__Does_It_Really_Work
    https://angel.co/company/massive-male-plus-male-enhancement-1
    https://www.xfactory.io/forum/she-qun-huo-dong-community-events/massive-male-plus-update-2020-does-it-really-work
    https://in.pinterest.com/pin/811633164091918022/
    https://in.pinterest.com/pin/811633164091918048/
    https://pubhtml5.com/otro/nizh
    https://pubhtml5.com/otro/khwn
    https://www.completefoods.co/diy/recipes/massive-male-plus-male-enhancement-5
    https://www.emailmeform.com/builder/form/759OeBd7SJf5t7i1

    ReplyDelete