Click here to Skip to main content
15,913,055 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: usercontrol event Pin
Dhyanga17-May-10 7:45
Dhyanga17-May-10 7:45 
GeneralRe: usercontrol event Pin
Rutvik Dave17-May-10 8:00
professionalRutvik Dave17-May-10 8:00 
GeneralRe: usercontrol event [modified] Pin
Dhyanga17-May-10 8:03
Dhyanga17-May-10 8:03 
GeneralRe: usercontrol event Pin
michaelschmitt17-May-10 8:40
michaelschmitt17-May-10 8:40 
GeneralRe: usercontrol event Pin
Dhyanga17-May-10 9:11
Dhyanga17-May-10 9:11 
GeneralRe: usercontrol event Pin
Not Active17-May-10 9:52
mentorNot Active17-May-10 9:52 
GeneralRe: usercontrol event Pin
Dhyanga17-May-10 9:55
Dhyanga17-May-10 9:55 
GeneralRe: usercontrol event Pin
PunkIsNotDead17-May-10 13:55
PunkIsNotDead17-May-10 13:55 
mmm! hard to understanding?

let's say that you have an ascx page name Logo.ascx.
Then when you add this ascx to a page named Test.aspx, your ascx User Control is named with ID="Logo1" in the Logo.ascx.cs add this:
C#
//this is Logo.ascx
public string txt;
private string Text
{
    get { return txt; }
    set { txt = value; TextBox1.Text = value; }//You must have a TextBox named TextBox1
}

and now you can call the public property of the ascx file! use this in Test.aspx or any page you've added the User Control
C#
//and this is Test.aspx
protected void Page_Load(object sender, EventArgs e)
{//Once you have understand the property's world ^^ you can
    Logo1.txt = "my text";//set the property value
    TextBox2_GetText.Text = Logo1.txt;//or get it's value
}

Wink | ;) good luck
GeneralRe: usercontrol event Pin
Not Active17-May-10 18:00
mentorNot Active17-May-10 18:00 
GeneralRe: usercontrol event Pin
PunkIsNotDead18-May-10 11:05
PunkIsNotDead18-May-10 11:05 
GeneralRe: usercontrol event Pin
Dhyanga18-May-10 2:31
Dhyanga18-May-10 2:31 
GeneralRe: usercontrol event Pin
Dhyanga18-May-10 2:43
Dhyanga18-May-10 2:43 
GeneralRe: usercontrol event Pin
PunkIsNotDead18-May-10 17:34
PunkIsNotDead18-May-10 17:34 
GeneralRe: usercontrol event Pin
Dhyanga19-May-10 3:23
Dhyanga19-May-10 3:23 
GeneralRe: usercontrol event [modified] Pin
PunkIsNotDead19-May-10 10:19
PunkIsNotDead19-May-10 10:19 
GeneralRe: usercontrol event Pin
Dhyanga20-May-10 5:09
Dhyanga20-May-10 5:09 
GeneralRe: usercontrol event Pin
PunkIsNotDead20-May-10 18:18
PunkIsNotDead20-May-10 18:18 
GeneralRe: usercontrol event Pin
Dhyanga24-May-10 3:13
Dhyanga24-May-10 3:13 
GeneralRe: usercontrol event Pin
PunkIsNotDead24-May-10 16:48
PunkIsNotDead24-May-10 16:48 
QuestionTabbed Excel Pin
Civic0617-May-10 5:58
Civic0617-May-10 5:58 
Questionstop Page scrolling upwards [modified] Pin
Enobong Adahada17-May-10 3:49
Enobong Adahada17-May-10 3:49 
AnswerRe: stop Page scrolling upwards Pin
dan!sh 17-May-10 5:22
professional dan!sh 17-May-10 5:22 
AnswerRe: stop Page scrolling upwards Pin
Rutvik Dave17-May-10 5:24
professionalRutvik Dave17-May-10 5:24 
GeneralRe: stop Page scrolling upwards Pin
DeepToot18-May-10 8:31
DeepToot18-May-10 8:31 
QuestionCannot find either column "dbo" or the user-defined function or aggregate "dbo.getname", or the name is ambiguous. Pin
sankararao17-May-10 3:24
sankararao17-May-10 3:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.