Click here to Skip to main content
15,898,134 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: stream reader Pin
DoctorMick13-Aug-09 6:11
DoctorMick13-Aug-09 6:11 
GeneralRe: stream reader Pin
lagan13-Aug-09 6:46
lagan13-Aug-09 6:46 
AnswerRe: stream reader Pin
N a v a n e e t h13-Aug-09 15:42
N a v a n e e t h13-Aug-09 15:42 
QuestionASP.NET is not authorized to access the requested resource. Pin
vandanaconedify13-Aug-09 3:15
vandanaconedify13-Aug-09 3:15 
AnswerRe: ASP.NET is not authorized to access the requested resource. Pin
Coding C#13-Aug-09 3:34
Coding C#13-Aug-09 3:34 
QuestionPlaceholder Pin
Ramkumar_S13-Aug-09 3:03
Ramkumar_S13-Aug-09 3:03 
AnswerRe: Placeholder Pin
Christian Graus13-Aug-09 14:42
protectorChristian Graus13-Aug-09 14:42 
QuestionClientID messes with my textbox - please help Pin
Axonn Echysttas13-Aug-09 1:49
Axonn Echysttas13-Aug-09 1:49 
Hi everybody.

Does anybody even IMAGINE why writing this in a RegisterStartupScript block would cause my textbox to lose its value upon postback???

Page.ClientScript.RegisterStartupScript(GetType(),"document.getElementById('" + txtp.ClientID + "').value; "...... etc
txtp.Text = "-1";


Let me say that one more time. I am reffering to the ClientID of "txtp" in a RegisterStartupScript. I merely take the value from it, that's all. And when the page retuns, txtp always has its default value, the one I populate in it, see the next line, when I set -1. But if I comment out that line with the .ClientID, then when the pages posts back, after I repopulate, even if I set -1 to the textbox, I DO GET THE CORRECT number in it, which was entered client-side, before the user presses the submit button.


With .Client ID line uncommented:
1. Load dynamic user control in which txtp is.
2. Set -1, register startup script
3. User writes 2 in the textbox
4. Submit
5. Value in textbox is -1.
WRONG

With .Client ID line commented:
1. Load dynamic user control in which txtp is.
2. Set -1, register startup script
3. User writes 2 in the textbox
4. Submit
5. Value in textbox is 2.
CORRECT

Somebody please help me out here....... I'm way over my head, I don't understand a bit of what is happening, even though I have studied the lifetime of the page and I am loading the control dinamically at the master's page Init.

But even if I messed something up in the lifetime, THIS STILL DOESN'T explain why a silly .Client ID messes everything up! Weird!

-= E C H Y S T T A S =-
The Greater Mind Balance

Blending C++ with COM ^

Have a break on my website! Spread the word? Please?

AnswerRe: ClientID messes with my textbox - please help Pin
Abhishek Sur13-Aug-09 2:15
professionalAbhishek Sur13-Aug-09 2:15 
GeneralRe: ClientID messes with my textbox - please help Pin
Axonn Echysttas13-Aug-09 3:36
Axonn Echysttas13-Aug-09 3:36 
GeneralRe: ClientID messes with my textbox - please help Pin
Abhishek Sur13-Aug-09 4:33
professionalAbhishek Sur13-Aug-09 4:33 
Questionsend xml file to client site Pin
zeeShan anSari13-Aug-09 1:26
zeeShan anSari13-Aug-09 1:26 
AnswerRe: send xml file to client site Pin
Abhishek Sur13-Aug-09 2:18
professionalAbhishek Sur13-Aug-09 2:18 
Questionpath urls relative to root of web app Pin
Colin Pace13-Aug-09 1:25
Colin Pace13-Aug-09 1:25 
AnswerRe: path urls relative to root of web app Pin
Coding C#13-Aug-09 2:16
Coding C#13-Aug-09 2:16 
AnswerRe: path urls relative to root of web app Pin
Jeremy Likness13-Aug-09 5:24
professionalJeremy Likness13-Aug-09 5:24 
Questionip address Pin
sachees12313-Aug-09 0:01
sachees12313-Aug-09 0:01 
AnswerRe: ip address Pin
Christian Graus13-Aug-09 0:32
protectorChristian Graus13-Aug-09 0:32 
AnswerRe: ip address Pin
Alok Sharma ji13-Aug-09 2:14
Alok Sharma ji13-Aug-09 2:14 
QuestionPass textbox value to javascript function Pin
Hemant Thaker13-Aug-09 0:00
Hemant Thaker13-Aug-09 0:00 
AnswerRe: Pass textbox value to javascript function Pin
Christian Graus13-Aug-09 0:31
protectorChristian Graus13-Aug-09 0:31 
QuestionRe: Pass textbox value to javascript function Pin
Hemant Thaker13-Aug-09 22:11
Hemant Thaker13-Aug-09 22:11 
AnswerRe: Pass textbox value to javascript function Pin
sajjy13-Aug-09 1:06
sajjy13-Aug-09 1:06 
QuestionRe: Pass textbox value to javascript function... Pin
Hemant Thaker13-Aug-09 22:12
Hemant Thaker13-Aug-09 22:12 
Questionno access to application in lan Pin
nikhil123412-Aug-09 23:36
nikhil123412-Aug-09 23:36 

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.