Click here to Skip to main content
15,890,512 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: How to retrieve data from a remote desktop database via REST API Pin
Afzaal Ahmad Zeeshan11-Feb-15 4:49
professionalAfzaal Ahmad Zeeshan11-Feb-15 4:49 
GeneralRe: How to retrieve data from a remote desktop database via REST API Pin
IsoftTech11-Feb-15 23:28
IsoftTech11-Feb-15 23:28 
AnswerRe: How to retrieve data from a remote desktop database via REST API Pin
Afzaal Ahmad Zeeshan12-Feb-15 3:08
professionalAfzaal Ahmad Zeeshan12-Feb-15 3:08 
Questionerror while updating the ms access data base after hosting the site on domain Pin
Member 1100557011-Feb-15 3:35
Member 1100557011-Feb-15 3:35 
AnswerRe: error while updating the ms access data base after hosting the site on domain Pin
Richard Deeming11-Feb-15 4:18
mveRichard Deeming11-Feb-15 4:18 
QuestionJavascript inside updatepanel cannot access server side variable after potback Pin
Moodhi10-Feb-15 11:40
Moodhi10-Feb-15 11:40 
AnswerRe: Javascript inside updatepanel cannot access server side variable after potback Pin
jkirkerx10-Feb-15 13:21
professionaljkirkerx10-Feb-15 13:21 
GeneralRe: Javascript inside updatepanel cannot access server side variable after potback Pin
Moodhi12-Feb-15 11:32
Moodhi12-Feb-15 11:32 
Apologies as HTML tags were removed when I added the code. I expected someone will simply cut and paste the .aspx and .aspx.vb pages and run the code.

Basically its a simple example containing a single textbox with a button next to it "select". All of this is inside an Update Panel which inside the Content Page of the Master Page.

The user enters some text in the text box and clicks select button, which calls Javascript routine - AddTextBox which creates a dynamic textbox underneath the orignal textbox and copies the value of text to it. User may continue to add as many text boxes as required and finally click the "Save" button.

The server then processes the dynamic textbox array as follows:

Dim serializer As New JavaScriptSerializer()
Dim textboxValues As String() = Request.Form.GetValues("Text1")
Me.TxtValues = serializer.Serialize(textboxValues)

So the values of textboxes are simply returned in string variable called "TxtValues".

On return the client extracts the values from the variable TxtValues and loops round to redisplay all textboxes as they were originally shown. This is done in Javascript routine - RecreateDynamicTextboxes and the code as you rightly pointed out is:
var txtValues = eval('<%=TxtValues%>');


The problem is that if I remove Update Panel then it all works fine the script reads all textbox values from the variable TxtValues, loops round and re-displays the textboxes. But when I add back the Update Panel the string variable TxtValues contains nothing because the variable is outside of the Panel.

Now I have discovered that if I place the "Save" button outside of the panel then that works but then the whole page blinks which is the main reason I want to use Update Panel.
mbmirza

GeneralRe: Javascript inside updatepanel cannot access server side variable after potback Pin
jkirkerx12-Feb-15 12:45
professionaljkirkerx12-Feb-15 12:45 
QuestionPrevent Validation From Normal HTML Controls Pin
Dominick Marciano10-Feb-15 8:32
professionalDominick Marciano10-Feb-15 8:32 
AnswerRe: Prevent Validation From Normal HTML Controls Pin
Richard Deeming10-Feb-15 10:17
mveRichard Deeming10-Feb-15 10:17 
AnswerRe: Prevent Validation From Normal HTML Controls Pin
jkirkerx10-Feb-15 13:27
professionaljkirkerx10-Feb-15 13:27 
QuestionAccess a function in user control from a aspx page Pin
ranjithkumark8-Feb-15 12:45
ranjithkumark8-Feb-15 12:45 
AnswerRe: Access a function in user control from a aspx page Pin
Richard Deeming9-Feb-15 2:54
mveRichard Deeming9-Feb-15 2:54 
AnswerRe: Access a function in user control from a aspx page Pin
loben325-Feb-15 2:30
loben325-Feb-15 2:30 
QuestionVideo Calling Pin
Member 110844697-Feb-15 10:03
Member 110844697-Feb-15 10:03 
AnswerRe: Video Calling Pin
Richard MacCutchan7-Feb-15 22:14
mveRichard MacCutchan7-Feb-15 22:14 
AnswerRe: Video Calling Pin
ZurdoDev9-Feb-15 4:58
professionalZurdoDev9-Feb-15 4:58 
QuestionUsing a linq in aspx Pin
Member 110844697-Feb-15 9:59
Member 110844697-Feb-15 9:59 
AnswerRe: Using a linq in aspx Pin
Richard Andrew x647-Feb-15 10:55
professionalRichard Andrew x647-Feb-15 10:55 
AnswerRe: Using a linq in aspx Pin
Richard MacCutchan7-Feb-15 22:13
mveRichard MacCutchan7-Feb-15 22:13 
AnswerRe: Using a linq in aspx Pin
ZurdoDev9-Feb-15 5:00
professionalZurdoDev9-Feb-15 5:00 
QuestionHow to export data from textbox and RichTextbox from Asp.net to Msword Templete Form? Pin
Member 85878306-Feb-15 20:37
Member 85878306-Feb-15 20:37 
QuestionRe: How to export data from textbox and RichTextbox from Asp.net to Msword Templete Form? Pin
ZurdoDev9-Feb-15 5:00
professionalZurdoDev9-Feb-15 5:00 
QuestionDatabase Query Pin
Malikdanish5-Feb-15 20:18
professionalMalikdanish5-Feb-15 20:18 

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.