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 6656
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.getElementById("uc1").style.display = 'block'); or
document.getElementById("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******@hotmail.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.getElementById("uc1").style.display = 'block'); or
document.getElementById("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******@hotmail.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...
|
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...
|
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....
|
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...
|
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...
|
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...
|
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...
|
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)...
|
by: cmrchs |
last post by:
Hi,
I have a web servercontrol with a property
public Color TextColor
{
get
{
return txtValue.ForeColor;
}
|
by: DolphinDB |
last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation.
Take...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
| |