Click here to Skip to main content
15,905,785 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionWebDev.WebServer.exe Error Pin
Khan.Bangash12-Sep-07 19:22
Khan.Bangash12-Sep-07 19:22 
AnswerRe: WebDev.WebServer.exe Error Pin
Sandeep Akhare12-Sep-07 20:22
Sandeep Akhare12-Sep-07 20:22 
GeneralRe: WebDev.WebServer.exe Error Pin
Khan.Bangash12-Sep-07 20:24
Khan.Bangash12-Sep-07 20:24 
Questionpopup window Pin
saravanan0512-Sep-07 18:43
saravanan0512-Sep-07 18:43 
AnswerRe: popup window Pin
Sandeep Akhare12-Sep-07 19:53
Sandeep Akhare12-Sep-07 19:53 
Questioncreate exe automatically Pin
praveenkumar_mca12-Sep-07 18:42
praveenkumar_mca12-Sep-07 18:42 
QuestionWindows server Pin
haidhir12-Sep-07 17:53
haidhir12-Sep-07 17:53 
Questionget/set accessors keep resetting Pin
Goalie3512-Sep-07 15:45
Goalie3512-Sep-07 15:45 
I have a dropdown list control on an aspx page that I need to pass the value of to an ascx page that I reference by using get/set. My problem however is after after I "set" the value, it seems to reset itself back to zero when I try to access it again.

Here's my code. I'm using 2 pages (index.aspx & testgridcontrol.ascx:

index.aspx:

-----------------------------------------------------------------------------

protected void Page_Load(object sender, EventArgs e)

{

TestGridControl tgc = new TestGridControl();

tgc.physicianID = Convert.ToInt16(dropDownListControl.SelectedItem.Value);

}

Here's my testgridcontrol.ascx page:

public partial class TestGridControl : System.Web.UI.UserControl

{

private Int16 _physicianID;

protected override void OnLoad(EventArgs e)

{

Response.Write(physicianID);

}

public Int16 physicianID

{

get { return _physicianID; }

set { _physicianID = value; }

}

-----------------------------------------------------------------------------

When I "set" this value, it's value is 3 however when I get to the line that reads "Response.Write(physicianID);", the value of physicianID is reset to zero. Any idea what I'm doing wrong? Thanks.

-Goalie35

AnswerRe: get/set accessors keep resetting Pin
Christian Graus12-Sep-07 15:59
protectorChristian Graus12-Sep-07 15:59 
GeneralI don't think that's it. Pin
Goalie3512-Sep-07 16:19
Goalie3512-Sep-07 16:19 
GeneralRe: I don't think that's it. Pin
/randz12-Sep-07 17:19
/randz12-Sep-07 17:19 
GeneralRe: I don't think that's it. Pin
Sandeep Akhare12-Sep-07 19:59
Sandeep Akhare12-Sep-07 19:59 
Questiondoc to html Pin
kkadir12-Sep-07 14:31
kkadir12-Sep-07 14:31 
AnswerRe: doc to html Pin
Sandeep Akhare12-Sep-07 23:14
Sandeep Akhare12-Sep-07 23:14 
QuestionInitializeComponent of user control in asp.net1.1 Pin
Md. Ismail12-Sep-07 11:11
Md. Ismail12-Sep-07 11:11 
AnswerRe: InitializeComponent of user control in asp.net1.1 Pin
Brent Lamborn12-Sep-07 11:53
Brent Lamborn12-Sep-07 11:53 
QuestioncustomValidation control. Pin
seemamltn12-Sep-07 10:44
seemamltn12-Sep-07 10:44 
AnswerRe: customValidation control. Pin
Imran Khan Pathan12-Sep-07 18:40
Imran Khan Pathan12-Sep-07 18:40 
QuestionGrid View Pin
seemamltn12-Sep-07 8:05
seemamltn12-Sep-07 8:05 
AnswerRe: Grid View Pin
eggsovereasy12-Sep-07 8:51
eggsovereasy12-Sep-07 8:51 
AnswerRe: Grid View Pin
Urs Enzler12-Sep-07 20:57
Urs Enzler12-Sep-07 20:57 
Questionasp:LoginStatus Control Logout Destination URL Pin
Brendan Vogt12-Sep-07 8:04
Brendan Vogt12-Sep-07 8:04 
AnswerRe: asp:LoginStatus Control Logout Destination URL Pin
eggsovereasy12-Sep-07 8:52
eggsovereasy12-Sep-07 8:52 
Questionhow to get out from Iframe Pin
kmanisha12-Sep-07 7:07
kmanisha12-Sep-07 7:07 
AnswerRe: how to get out from Iframe Pin
Brent Lamborn12-Sep-07 7:39
Brent Lamborn12-Sep-07 7:39 

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.