What's the best way to refresh a usercontrol using a parameter? My
usercontrol is just a DataList that retrieves data from SQL in association
with a public propterty.
I click on a LinkButton in my main page (ASPX), but it still refreshes the
entire page... I only want the UserControl to blink and come back with new
data.
What's the direction I should be looking at? Even if I do it via
JavaScript, how would I refresh the UserControl using JavaScript?
TIA,
-roko 4 6682
My hunch is that this is not possible. Here's why:
1 - JavaScript cannot trigger anything on the server. UC
are run at the server. Therefore JS alone could not
trigger anything for a UC to refresh.
2 - UC ultimately get generated into regular HTML that is
merged with the rest of your page, just look at the view
source HTML from your browser. To re-generate the UC
requires re-generating the entire page.
In terms of solutions, would caching help out? Perhaps
putting the UC in a sub-frame so that it still has its own
page that refreshes?
HTH,
Tim Stall -----Original Message----- What's the best way to refresh a usercontrol using a
parameter? Myusercontrol is just a DataList that retrieves data from
SQL in associationwith a public propterty.
I click on a LinkButton in my main page (ASPX), but it
still refreshes theentire page... I only want the UserControl to blink and
come back with newdata.
What's the direction I should be looking at? Even if I
do it viaJavaScript, how would I refresh the UserControl using
JavaScript? TIA, -roko .
My hunch is that this is not possible. Here's why:
1 - JavaScript cannot trigger anything on the server. UC
are run at the server. Therefore JS alone could not
trigger anything for a UC to refresh.
2 - UC ultimately get generated into regular HTML that is
merged with the rest of your page, just look at the view
source HTML from your browser. To re-generate the UC
requires re-generating the entire page.
In terms of solutions, would caching help out? Perhaps
putting the UC in a sub-frame so that it still has its own
page that refreshes?
HTH,
Tim Stall -----Original Message----- What's the best way to refresh a usercontrol using a
parameter? Myusercontrol is just a DataList that retrieves data from
SQL in associationwith a public propterty.
I click on a LinkButton in my main page (ASPX), but it
still refreshes theentire page... I only want the UserControl to blink and
come back with newdata.
What's the direction I should be looking at? Even if I
do it viaJavaScript, how would I refresh the UserControl using
JavaScript? TIA, -roko .
As a quick fix, what I did was load all those UCs that I need (3 images with
links vertically on the right side), enclosed them all within their own div
tags. So for 4 user controls, I have them all enclosed in 4 div tags. I
used javascript to show/hide these div tags, i.e.
document.getEle mentById("uc1") .style.display = 'block'); or
document.getEle mentById("uc1") .style.display = 'none');
I found this method thanks to this link: http://www.webmatrixproject.net/Foru...1&PostID=21175
As it is done, three images shows up in the UC (as there's only enough room
for it), but if I was to do some pagination in that datalist of images, I
think I will be stuck, but otherwise, I'm OK for the time being...
Still not a be-all, end-all solution, but worth working towards... :-)
-roko
"Tim S." <ti******@hotma il.com> wrote in message
news:00******** *************** *****@phx.gbl.. . My hunch is that this is not possible. Here's why: 1 - JavaScript cannot trigger anything on the server. UC are run at the server. Therefore JS alone could not trigger anything for a UC to refresh.
2 - UC ultimately get generated into regular HTML that is merged with the rest of your page, just look at the view source HTML from your browser. To re-generate the UC requires re-generating the entire page.
In terms of solutions, would caching help out? Perhaps putting the UC in a sub-frame so that it still has its own page that refreshes?
HTH, Tim Stall
-----Original Message----- What's the best way to refresh a usercontrol using a parameter? Myusercontrol is just a DataList that retrieves data from SQL in associationwith a public propterty.
I click on a LinkButton in my main page (ASPX), but it still refreshes theentire page... I only want the UserControl to blink and come back with newdata.
What's the direction I should be looking at? Even if I do it viaJavaScript, how would I refresh the UserControl using JavaScript? TIA, -roko .
As a quick fix, what I did was load all those UCs that I need (3 images with
links vertically on the right side), enclosed them all within their own div
tags. So for 4 user controls, I have them all enclosed in 4 div tags. I
used javascript to show/hide these div tags, i.e.
document.getEle mentById("uc1") .style.display = 'block'); or
document.getEle mentById("uc1") .style.display = 'none');
I found this method thanks to this link: http://www.webmatrixproject.net/Foru...1&PostID=21175
As it is done, three images shows up in the UC (as there's only enough room
for it), but if I was to do some pagination in that datalist of images, I
think I will be stuck, but otherwise, I'm OK for the time being...
Still not a be-all, end-all solution, but worth working towards... :-)
-roko
"Tim S." <ti******@hotma il.com> wrote in message
news:00******** *************** *****@phx.gbl.. . My hunch is that this is not possible. Here's why: 1 - JavaScript cannot trigger anything on the server. UC are run at the server. Therefore JS alone could not trigger anything for a UC to refresh.
2 - UC ultimately get generated into regular HTML that is merged with the rest of your page, just look at the view source HTML from your browser. To re-generate the UC requires re-generating the entire page.
In terms of solutions, would caching help out? Perhaps putting the UC in a sub-frame so that it still has its own page that refreshes?
HTH, Tim Stall
-----Original Message----- What's the best way to refresh a usercontrol using a parameter? Myusercontrol is just a DataList that retrieves data from SQL in associationwith a public propterty.
I click on a LinkButton in my main page (ASPX), but it still refreshes theentire page... I only want the UserControl to blink and come back with newdata.
What's the direction I should be looking at? Even if I do it viaJavaScript, how would I refresh the UserControl using JavaScript? TIA, -roko .
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: The Mess |
last post by:
I recently made a UserControl consisting of buttons in a frame.
The problem is that random strange markings appear sometimes under the
buttons. They can be 'wiped off' with another window, and re-marked also
with other windows (by dragging them over). Anyone know the problem and/or
the cure?
Otherwise things seem to work good.
I have been playing around with the cls and refresh methods of UserControl,
refresh for the Buttons & Frame, with...
|
by: Jose Michael Meo R. Barrido |
last post by:
I made a custom runded rectangle usercontrol. I used a function i found on
the internet. the function works fine(see "GetRoundRect" below).
I use the fullowing code to make my usercontrol rounded....
*****************************************************
Protected Overrides Sub OnPaint(ByVal e As
System.Windows.Forms.PaintEventArgs)
Dim x1 As Integer = 0
Dim x2 As Integer = Me.ClientSize.Width
Dim iHeight As Int32 = Me.Height
Dim...
|
by: lc |
last post by:
I use a series of UserControl that get dynamically created and (all)
docked (fill) on one form panel. Problem is that I have to call
UserControl.BringToFront() more than once to get it to show. This
happens even when only one user control has been created and docked. I
tried with Show(), Refresh() and Invalidate() but had no luck so far.
I gotta be missing something obvious but nothing comes to mind. Any
idea anyone?
TIA
|
by: Jaikumar |
last post by:
Hi,
1) I have created one windows application, In the main form ( form1) i have added one usercontrol (usercontrol1), In that user control i am drawing one image.
2) In the UserControl1 i am showing one transparent form (form3) when ever user preseed left mouse button.
3) The form3 has one transparent user control (usercontrol2) that paints circles. That measn the circles will show on top the usercontrol1 image.
4) The form3 border style...
|
by: Tinus |
last post by:
Hello all,
I've create a custom control (UserControl) and have a custom Item
Collection. The control is a custom calendar which is draw using the
Graphics Rectangle etc. functions. It is drawn when the control is painted
or resized. When the control is drawn it draws also the items found in the
collection.
So far so good.... I have 3 questions which I'm unable to find a solution
| |
by: Rob Koch |
last post by:
What's the best way to refresh a usercontrol using a parameter? My
usercontrol is just a DataList that retrieves data from SQL in association
with a public propterty.
I click on a LinkButton in my main page (ASPX), but it still refreshes the
entire page... I only want the UserControl to blink and come back with new
data.
What's the direction I should be looking at? Even if I do it via
JavaScript, how would I refresh the UserControl...
|
by: Lau Lei Cheong |
last post by:
Hello,
I'm writing a usercontrol that contains a property named "disabled". It
is set to false by default but there is also another button in the
usercontrol that'll set it to true.
On the main form a number of them are displayed. During the On_Load
event, 1) It'll check to see if the usercontrol is disabled. If true, the
row containing the usercontrol is hidden.
|
by: Executor |
last post by:
Hi you all,
I have created a usercontrol with a filledEllipses on a
filledRectangle, using this Paint event:
private void myControl_Paint(object sender,
System.Windows.Forms.PaintEventArgs e)
{
SolidBrush aBrush = new SolidBrush(this.BackColor);
e.Graphics.FillRectangle(aBrush, 10,10, this.Width - 10, this.Height
|
by: cmrchs |
last post by:
Hi,
I have a web servercontrol with a property
public Color TextColor
{
get
{
return txtValue.ForeColor;
}
|
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: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
| |
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: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |