Assign Server Side Loop Variable To Client Array?
Dec 29, 2011Code of my web page.I made changes according to ur suggestions but title is invisible or not displaying what has missed by me [code]...
View 1 RepliesCode of my web page.I made changes according to ur suggestions but title is invisible or not displaying what has missed by me [code]...
View 1 RepliesI have a Server side variable by the following code
Dim mgps As New Text.StringBuilder
Public ReadOnly Property GPS() As String
Get
Return mgps.ToString
End Get
[Code]...
I have a Server side variable by the following code
Dim mgps As New Text.StringBuilder
Public ReadOnly Property GPS() As String
Get[code]..........
and replace the store_locations with GPS but my map become empty.
I am struckup with a problem from last two days. I am creating a web application using VB.NET, Ajax & RAD Controls. When user clicks on a button I want to open a RAD Window and show the list of ledgers available to the user, so that he can select one from the list. And to open that window I have to call a java script function from client side, which is already achieved using the below code.
[Code]...
Can I send an object from client-side javascript to server-side code via ASP.NET ?
View 5 RepliesI know this defeats the purpose of client side vs. server side (refer to title of this thread). What I would love to do is build my own custom progress indicator on the client showing how far a server side code has progressed. I figure if I could only get a JavaScript to fire and render a value of some control at pre-defined intervals while the server is working I could make it happen - but alas I'm beginning to believe that this is impossible. Below is some code that performs three 2 sec loops. At the end of each I want to change the visible value of a control on the browser. [Code]
View 8 RepliesUsing the following script:
$("#some_button").click(function() {
var changed = [];
[CODE]...
I need to send back the id, the old value from _1 and the new value from _0 back to the server. What is the best way to format this data so I can easily extract the data from the server side so I can easily email someone for example to let them know which textboxes have changed, what the old values were, and what the new values are
At the serverside level, I am using .NET-3.5 (VB). I know how to send the data bacl. and how to email the data, I just wanted to know how to best format the data at clientside before sending it back. I could have upto 50 sets of id, old, and new values to send back. Sorry for not making that clear earlier.
Example:
How can I modify the script above to generate this?
[
{
"id": "name_0",
"new": "text",
[CODE]...
I'm trying to, from a client-side piece, call off to a server-side piece. I need to do this synchronously. On my server-side code, though, I'm calling off to another piece of code, which I want to have a maximum of, say, 10 seconds to return a value. If I don't have a response within 10 seconds, I want to force my own server piece to set my result equal to 0, and return to the client.
Here's what I have on my server-side code so far:
Public Function GetWebResult(ByVal inputParameter As Object) As WebReturnObject Implements IWebInterface.GetWebResult
Dim result As New WebReturnObject
Dim webItem As WebItem = Nothing
[CODE]...
I realize this code is not functional. The problem is that I'm unsure how I would go about getting back into GetWebResult to set the appropriate return values before it is sent back to the client.
I add an option to a select with jQuery. When I save with an asp button, I don't see the changes on the server side in the click event.
And the HTML is all correct after I add the option.
Is it a coding problem or I don't understand something?
$(selectCourant)
.append($("<option></option>")
.attr("value",$(dropdown).val())
.text($(dropdown + " option:selected").text()));
I have been reading through Atheists posts in regards to client-server and TCP client/server connection's. But how do i go about writing a program with 1 client and server where the client side creates a text file.Once the server sees there is a text file it connects and downloads it to itself or the client pushes the text file to the server.Once on the server i will read the text file and put its info into a sql db.
View 14 RepliesUltimately, what I want to accomplish is an AJAX-based messaging system. I already have a database table for messages, and an ASPX to add new messages (and declare old messages no longer relevant).
The current messaging system simply polls the server every 15 seconds, and re-pulls the current message set.
What I am looking to do is: On $(document).ready(), register an ajax callback function that listens for a server-side event (e.g., MessagesUpdated) On table insert/update, fire MessagesUpdated server-side.
This way, whenever the table is updated (or new records added), any clients listening know that new data is available and can re-poll the server then.
Ideally, I'd also like to make the new data available as an event argument (to minimize re-polling the db).
I can find references to something like this in other languages, but I cannot find any actual code examples to get me started.
Assuming this is possible to do via .Net, can anyone help get me started on this?
I'm using the 2.0 Framework. Also while I added a VB.Net tag, I can read C# reasonably well, so please feel free to post in either language.
Currently, in my web application I have a listbox that gets populated client side (via java script) with a set of ids -- we'll call this page 1. Server side, I am populating a variable with the ids and passing it through a query string to another page -- we'll call it page 2. Now, I have a previous button on page2 which allows me to go to page 1. I'm trying to figure out how to repopulate the listbox on page 1 with the values previously selected. I was thinking of just storing the set of ids in a session variable and using it client side to repopulate the list box. Can anyone advise on how to access a session variable client side?[code]...
View 1 RepliesCurrently, in my web application I have a listbox that gets populated client side (via java script) with a set of ids -- we'll call this page 1. Server side, I am populating a variable with the ids and passing it through a query string to another page -- we'll call it page 2. Now, I have a previous button on page2 which allows me to go to page 1. I'm trying to figure out how to repopulate the listbox on page 1 with the values previously selected. I was thinking of just storing the set of ids in a session variable and using it client side to repopulate the list box. Can anyone advise on how to access a session variable client side? Here's some snippets of my code...
[Code]...
i am using this Page.ClientScript.RegisterStartupScript() to call a javascript function from vb code behind , and this works fine with me My question is how can i send variables from the code behind to the javascript function here is what i have tried so far :
[Code]...
I want both the client and server to write and read resp. at a constant rate (which can be configured on the GUI of the client) to the buffer.I am able to send from the client at 150 bytes per packet Now, I should be able to read also at 150 bytes per packet on the server too Since, both are connected through a socket, can we retrieve the socket params (set on the client size, like 150 here) from the server end, using the tcpServer object.Or is it must to send an initial setup packet which tells about these client params and so accordingly the server can continue?
View 1 RepliesI've got a bunch if labels that are changed as a user inputs data into a form of mine. The Labels are changes with js on the client side. I then after all the submission are in put use a vb script to pull the string values from these labels. The problem is the vb net part is not reading the new values of these labels. Anyway I can get it to read the new values? I have over 40 labels.
[Code]...
Anyone has a quick and dirty sample coding to making this work? Currently, I have server, client with Interface object as intermediate object between the 2. If I declare events in the Interface, then Dim object on client side with "WithEvents", I'll get error when I reach this line:
vb
serverObj = CType(Activator.GetObject(GetType(InterfaceObj), szURI), GetType(InterfaceObj)
Having headaches looking for solutions.
I am building an internal web page which retrieves binary data from a SQL database, converts the binary to an image file, then opens the file on the clients PC.In debug mode, this works fine, because the program downloads the file successfully into a temporary directory, converts it to the image then uses System.Diagnostics.Process.Start() to launch the image file in the associated image viewing program.However, as soon as I upload it to the server, two undesired things happen:
a. The file gets saved on the servers temporary directory, instead of the client temporary directory (I kind of expected this to happen, so this wasnt much of a suprise)
b. System.Diagnostics.Process.Start() does not launch the file successfully. Nothing actually happens when it gets to this part of code, however I suspect that it is trying to launch the process on the server end, instead of the client end.
how I can get System.Diagnostics.Process.Start() to launch on the client end OR how I could get the image to just appear in the clients web browser instead?
The problem im having is that I have a table that when a user click on a button it adds a row to the table via javascript, which works fine. The problem is that if a user need to update other data the user click another button which refreshes the page and all rows the user created in the table are deleted. My question is what can I do to make the rows not to be deleted once the page is refreshed? I know some might think, just not refresh the page, but there is to much data that has to be displayed and a new query has to be generated to grab the data.
[Code]...
I have just put option strict on and do not understand how to grab an array from a function without late binding error?
Function returns an array -> ZAr(1) which contains two further arrays: ZAr(0) = Components(10), ZAr(1) = Fractions(10)
So when the function has returned ZAr, I wish to assign new array variables to each of the contained arrays, but the following does not work:
dim Cps() as double = ZAr(0)
dim Fracs() as double = ZAr(1)
I have an array list on my server side that i want to use on my client side as an array how can i do this.
View 1 RepliesI have a client/server program. There is a variable called readData that takes returndata and places it there. My question is, why can't I access this variable directly, for instance, varC = readData and then try to access a piece of it i.e. textbox1.text = varC(2), I get an error "object reference not set to instance of an object". Why is this happening? It is because the readData is a networking 'component'? How do I get around this? I can post more code from the server app if needed.
[Code]...
I am new to VB.net and struggling to get out of VB6's way of sending data, I am doing this to send a byte array from my client to server, please advice if this is the right way,The sending portion:
Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button1.Click
Dim arrNo(3) As Integer
[code].....
Lets say I have declared an array by doing:
dim array()
Also have a variable:
dim loopsize = 10
Then i do this:
for loop = 1 to loopsize
array(loop) = 5
next
What i wanted to do with this is from array(1) through to array(10), the values will be changed to 5. But vb will not allow this and crashes.
Why doesn't this work and how can i make it work?
Im developing in VS 2010 Pro, VB.
Is there a way to use the following statement, but before executing the Using statement, assign the right side of cnn to cnn using an if statement?
Using cnn As New Data.OleDb.OleDbConnection(My.Settings.ABC)
For instance, I would like to use an if statement to determine which My.Settings to use similar to:
CODE:
Then, after the If statement, use cnn in a Using statement.
how to create a client/server... But I couldn't... I don't want anything fancy. Just want the client to send the server 4 numbers, depending on the user's choice; after that, the server would turn off the pc, restart it, etc. It all depends on the number received. Is there a rather "simple" way to do it? If it's not to much trouble you could use Atheist's example. (Btw I don't understand the code and, yes, I've checked on [URL])
View 9 RepliesHey guys, I am trying to send data from client to server (encrypted) and the string sent from the client is not the same as recieved from the server. I've been killing my brain for hours to get this to work but I cant manage. Im converting everything to Base64 string.
Client:
Public Sub SendMessage(ByVal msg As String)
Try
SyncLock myclient.GetStream
sw = New IO.StreamWriter(myclient.GetStream)
[code]....
We are creating a Who wants to be a millionaire style game in VB. Our server is pulling information such as questions and answers from a Access Database and sending them to the contestants (Clients). All transfer of information is directly from the server to each client. One of the "Life Lines" we want to use is "Ask a friend", where one client is able to Instant message another client for a short time to get help on the question.
[Code]...
basically i just want client to say "C: emp" ENTER
then, server must reply with all its files in c: emp
The problem I have is: When I click on cmdListen in the server form and cmdConnect in the client form,both programs won't respond and they crash for some reason I don't know.
Client source code:
Code:
Imports System.Net.Sockets
Imports System.Text
Public Class Form1
[CODE]...
Code:
Imports System.Net.Sockets
Imports System.Text
Public Class Form1
[CODE]...