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

ASP.NET

 
GeneralRe: User Controls disappear on PostBack Pin
syed shanu5-Dec-14 12:10
professionalsyed shanu5-Dec-14 12:10 
GeneralRe: User Controls disappear on PostBack Pin
Member 106878536-Dec-14 20:13
Member 106878536-Dec-14 20:13 
QuestionI am still struggling to find a fix for this. Can some guru please help? Pin
samflex4-Dec-14 10:37
samflex4-Dec-14 10:37 
AnswerRe: I am still struggling to find a fix for this. Can some guru please help? Pin
ZurdoDev4-Dec-14 10:44
professionalZurdoDev4-Dec-14 10:44 
GeneralRe: I am still struggling to find a fix for this. Can some guru please help? Pin
samflex4-Dec-14 11:05
samflex4-Dec-14 11:05 
QuestionRe: I am still struggling to find a fix for this. Can some guru please help? Pin
ZurdoDev4-Dec-14 14:14
professionalZurdoDev4-Dec-14 14:14 
AnswerRe: I am still struggling to find a fix for this. Can some guru please help? Pin
onelopez4-Dec-14 11:18
onelopez4-Dec-14 11:18 
AnswerRe: I am still struggling to find a fix for this. Can some guru please help? Pin
jkirkerx4-Dec-14 13:04
professionaljkirkerx4-Dec-14 13:04 
You have to put that in a hidden textbox.

The asp.net server remembers everything it generates, and sends back to the browser. So take a dropdownbox for instance, if you populate a dropdown box, and then use javascript to clear it, the server will think that someone tampered with the value, and generate an error. But with a textbox, the server expects the values to change, so that's OK.

Only HTML Elements with the word input really post back to the server. All others don't, it's a waste of time and bandwidth.
button
checkbox
color
date
datetime
datetime-local
email
file
hidden
image
month
number
password
radio
range
reset
search
submit
tel
text
time
url
week 


So a textbox and a dropdown box use the input element, which is programmable to act like a textbox, dropdownlist, radio button, checkbox and so forth.

Make a asp.net textbox object, and set the CSS display: none
style="display: none;"
Were using the CSS style because I'm skeptical of the visible attribute.
Let the textbox show until you prove it works, then use the display.

Were using clientIDmode, because the id value will stay the same for use in javascript.

Off the top of my head;
<asp:textbox id="txt_geolocation" runat="server" <b="">clientIDmode="static" style=display: none;">

If you don't make the asp.net object, the textbox will most likely give you trouble posting back it's value.

[edit]
document.getElementById('txt_geolocation').value('stuff you geolocation info in here');


textbox use the attr value, and has no innerHTML.
GeneralRe: I am still struggling to find a fix for this. Can some guru please help? Pin
samflex4-Dec-14 16:44
samflex4-Dec-14 16:44 
GeneralRe: I am still struggling to find a fix for this. Can some guru please help? Pin
jkirkerx5-Dec-14 7:58
professionaljkirkerx5-Dec-14 7:58 
GeneralRe: I am still struggling to find a fix for this. Can some guru please help? Pin
samflex5-Dec-14 8:54
samflex5-Dec-14 8:54 
GeneralRe: I am still struggling to find a fix for this. Can some guru please help? Pin
jkirkerx5-Dec-14 11:41
professionaljkirkerx5-Dec-14 11:41 
GeneralRe: I am still struggling to find a fix for this. Can some guru please help? Pin
samflex5-Dec-14 13:35
samflex5-Dec-14 13:35 
GeneralRe: I am still struggling to find a fix for this. Can some guru please help? Pin
jkirkerx5-Dec-14 13:47
professionaljkirkerx5-Dec-14 13:47 
GeneralRe: I am still struggling to find a fix for this. Can some guru please help? Pin
samflex5-Dec-14 14:23
samflex5-Dec-14 14:23 
GeneralRe: I am still struggling to find a fix for this. Can some guru please help? Pin
jkirkerx5-Dec-14 16:37
professionaljkirkerx5-Dec-14 16:37 
GeneralRe: I am still struggling to find a fix for this. Can some guru please help? Pin
samflex5-Dec-14 17:52
samflex5-Dec-14 17:52 
GeneralRe: I am still struggling to find a fix for this. Can some guru please help? Pin
jkirkerx5-Dec-14 18:11
professionaljkirkerx5-Dec-14 18:11 
GeneralRe: I am still struggling to find a fix for this. Can some guru please help? Pin
samflex6-Dec-14 3:47
samflex6-Dec-14 3:47 
GeneralRe: I am still struggling to find a fix for this. Can some guru please help? Pin
jkirkerx6-Dec-14 7:53
professionaljkirkerx6-Dec-14 7:53 
GeneralWorking copy of your code. Pin
jkirkerx6-Dec-14 9:00
professionaljkirkerx6-Dec-14 9:00 
GeneralRe: Working copy of your code. Pin
samflex6-Dec-14 14:47
samflex6-Dec-14 14:47 
GeneralRe: Working copy of your code. Pin
samflex6-Dec-14 16:21
samflex6-Dec-14 16:21 
QuestionAsp.net page with Web Service WITHIN code behind being called Pin
StealthRT4-Dec-14 5:13
StealthRT4-Dec-14 5:13 
QuestionRe: Asp.net page with Web Service WITHIN code behind being called Pin
jkirkerx4-Dec-14 8:55
professionaljkirkerx4-Dec-14 8:55 

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.