I am creating a control (an image) on the server and Adding it to a Panel's
Controls collection. On the client side I want to drag the control to a new
location using the ondrag event to modify the style.top and style.left. On
ondragend the form is submitted. The first problem I am having is that after
the form is submitted the image is gone. This problem can be solved by
having the server sent the image to the client using the Panel's InnerHtml
property. Is there a way to get the control to persist across round trips
when it is added to the Panel using Controls.Add? The second problem is
getting the modifications of the style attribute made by client-side
javascript to persist. Can this be done by setting the right properties
somewhere? Some things seem to persist in the <DIV> without effort like
text. How can an added control be made to persist and how can the
client-side modified style attribute be made to persist.
THANK YOU in advance.
David 2 1179
Hi David,
To have the Control persist, you would have to add it back with each
PostBack.
To have the style information persist, you would have to store that
information somewhere in the page, for example in a hidden form field, when
it changes, then grab the hidden form field's contents on PostBack, and
write a startup script JavaScript that would re-set the style when the page
is returned to the browser.
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer
You can lead a fish to a bicycle,
but it takes a very long time,
and the bicycle has to *want* to change.
"David" <Co*********@Ad sorptionProcess Modeling.com> wrote in message
news:QmKpf.5765 7$WH.5596@duker ead01... I am creating a control (an image) on the server and Adding it to a Panel's Controls collection. On the client side I want to drag the control to a new location using the ondrag event to modify the style.top and style.left. On ondragend the form is submitted. The first problem I am having is that after the form is submitted the image is gone. This problem can be solved by having the server sent the image to the client using the Panel's InnerHtml property. Is there a way to get the control to persist across round trips when it is added to the Panel using Controls.Add? The second problem is getting the modifications of the style attribute made by client-side javascript to persist. Can this be done by setting the right properties somewhere? Some things seem to persist in the <DIV> without effort like text. How can an added control be made to persist and how can the client-side modified style attribute be made to persist.
THANK YOU in advance.
David
Thank you. I now know to stop looking for a better way.
"Kevin Spencer" <ke***@DIESPAMM ERSDIEtakempis. com> wrote in message
news:Oq******** ******@TK2MSFTN GP12.phx.gbl... Hi David,
To have the Control persist, you would have to add it back with each PostBack.
To have the style information persist, you would have to store that information somewhere in the page, for example in a hidden form field, when it changes, then grab the hidden form field's contents on PostBack, and write a startup script JavaScript that would re-set the style when the page is returned to the browser.
-- HTH,
Kevin Spencer Microsoft MVP .Net Developer You can lead a fish to a bicycle, but it takes a very long time, and the bicycle has to *want* to change.
"David" <Co*********@Ad sorptionProcess Modeling.com> wrote in message news:QmKpf.5765 7$WH.5596@duker ead01...I am creating a control (an image) on the server and Adding it to a Panel's Controls collection. On the client side I want to drag the control to a new location using the ondrag event to modify the style.top and style.left. On ondragend the form is submitted. The first problem I am having is that after the form is submitted the image is gone. This problem can be solved by having the server sent the image to the client using the Panel's InnerHtml property. Is there a way to get the control to persist across round trips when it is added to the Panel using Controls.Ad d? The second problem is getting the modifications of the style attribute made by client-side javascript to persist. Can this be done by setting the right properties somewhere? Some things seem to persist in the <DIV> without effort like text. How can an added control be made to persist and how can the client-side modified style attribute be made to persist.
THANK YOU in advance.
David
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: John J |
last post by:
I've written the following code into a class to search for and display the
results of all races entered (The complete code is in a previous thread). I
wish to amend the code so as to display the best result only.
Can anyone suggest a simple amendment to the following that will result in
only the best result being displayed?
|
by: Matt Kruse |
last post by:
http://www.JavascriptToolbox.com/bestpractices/
I started writing this up as a guide for some people who were looking for
general tips on how to do things the 'right way' with Javascript. Their code
was littered with document.all and eval, for example, and I wanted to create
a practical list of best practices that they could easily put to use.
The above URL is version 1.0 (draft) that resulted. IMO, it is not a
replacement for the FAQ,...
|
by: hagai26 |
last post by:
I am looking for the best and efficient way to replace the first word
in a str, like this:
"aa to become" -> "/aa/ to become"
I know I can use spilt and than join them
but I can also use regular expressions
and I sure there is a lot ways, but I need realy efficient one
|
by: Irene |
last post by:
Hi all,
I have set up a simple VB program (and later on an ASP interface) to
manage an Athletics database. I'm using Access 2000.
To simplify, I have the Athlets, the Competitions and the Scores
tables.
When I want to list of the best scores/ranking, I just do:
|
by: l.woods |
last post by:
I want your recommendation on which ASP.NET Shopping Cart software I should
buy?
Best code
Best documentation
Best support (if needed. I will buying source code, if possible)
TIA,
Larry Woods
| |
by: jojobar |
last post by:
Hello,
I am trying to use vs.net 2005 to migrate a project originally in vs.net
2003. I started with creation of a "web site", and then created folders for
each component of the site.
I read somewhere that each folder under the "web site" is compiled in
separate assembly. I however, did not find that the "web site" creation in
vs.net 2005 created any AssemblyInfo.cs file.
|
by: Ren |
last post by:
Hi All,
I'm still rather new at vb.net and would like to know the proper way to access
private varibables in a class. Do I access the variable directly or do I use
the public property?
public class MyClass
private _variableName as integer
public property VariableName as integer
|
by: Ned Balzer |
last post by:
Hi all,
I am pretty new to asp.net; I've done lots of classic asp, but am just
beginning to get my mind wrapped around .net.
What I'd like to do is include some code that tests if a user is logged
in, on each and every page, and redirects the user to a login page if
s/he's not logged in. The login page will also take care of some
standard setup, such as choosing/populating a user profile. I used to
use <!-- #include ... --for this,...
|
by: Earl |
last post by:
I have all of my data operations in a separate library, so I'm looking for
what might be termed "best practices" on a return type from those classes.
For example, let's say I send an update from the UI layer to a method in a
library class that calls the stored procedure. Best to return a boolean
indicating success/failure, return a string with the exception message, or
just return the entire exception?
|
by: ankitmathur |
last post by:
Hi,
I'm trying to overcome a situation whereby I have to search through 4-5 columns and produce the results with an order by according to the values matched in these columns.
Example:
My Table Structure:
Create Table TestPfx
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
| |
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |