Ask a Question related to ASP.NET General, Design and Development.
-
Rob Koch #1
usercontrol refresh
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
Rob Koch Guest
-
Can we use a usercontrol inside a usercontrol
hi group can we use a usercontrol inside a usercontrol. i mean can we use <%Register tagprefix..... src=....ascx%> in an ascx file. thanks in... -
Event not firing in usercontrol inside usercontrol
I'm stumped on this problem. I've created a user control that dynamically creates 5 linkbuttons in the CreateChildControls method. Each of these... -
using refresh button on the menu bar to refresh two frames.
All, I have an ASP site that uses frames two frames. (yes I should be using include files, but we started ou using frames so we have been stuck... -
Problem with refresh button breaking automatic refresh
As a public service, I'm posting the solution to a problem I had. The bizarre thing is that I think this should have created an error. Instead, it... -
Use LoadControl to load a usercontrol but the webcontrol in the usercontrol can not AutoPostBack
a uscontrol test.ascx have a dropdownlist web control the dropdownlist's AutoPostBack property is set "true" but when i use... -
Tim S. #2
usercontrol refresh
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
parameter? My>-----Original Message-----
>What's the best way to refresh a usercontrol using aSQL in association>usercontrol is just a DataList that retrieves data fromstill refreshes the>with a public propterty.
>
>I click on a LinkButton in my main page (ASPX), but itcome back with new>entire page... I only want the UserControl to blink anddo it via>data.
>
>What's the direction I should be looking at? Even if IJavaScript?>JavaScript, how would I refresh the UserControl using>
>TIA,
>-roko
>
>
>
>.
>Tim S. Guest
-
Rob Koch #3
Re: usercontrol refresh
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:
[url]http://www.webmatrixproject.net/Forums/ShowPost.aspx?tabindex=1&PostID=21175[/url]
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." <timstall@hotmail.com> wrote in message
news:003901c34a2d$f53a0570$a501280a@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
>
>> parameter? My> >-----Original Message-----
> >What's the best way to refresh a usercontrol using a> SQL in association> >usercontrol is just a DataList that retrieves data from> still refreshes the> >with a public propterty.
> >
> >I click on a LinkButton in my main page (ASPX), but it> come back with new> >entire page... I only want the UserControl to blink and> do it via> >data.
> >
> >What's the direction I should be looking at? Even if I> JavaScript?> >JavaScript, how would I refresh the UserControl using> >
> >TIA,
> >-roko
> >
> >
> >
> >.
> >
Rob Koch Guest



Reply With Quote

