.NET Newbie Question

J

Jeff Johnson

I"m updating an ASP site to ASP.NET and have a question....

My site is a vehicle configurator in which the user selects a image (paint
swatch), the colour code is submitted on a hidden page and the newly
selected paint swatch is highlighted, seamlessly, via JavaScript generated
from the hidden page.

So, in .NET I'm generating the paint swatches with the ImageButton server
control, and when the user selects a swatch, the page refreshes and I want
to know if I can use .NET and highlight the newly selected paint swatch
without seeing the flash of the page refresh.

Am I stuck using a hidden page generating JavaScript to avoid seeing this?

Thanks,

JJ
 
A

Arran Pearce

I think you can use SmartNavigation get stop the page flash, however
this only works with IE.

You can still use client side code on the ImageButton. What you need to
do is Register some client script then use the AddAttribute method to
run the javascript OnClick
 
J

Jeff Johnson

I thought of that, but the click still requies a trip to the server in order
to set the new configuration.

JJ
 
A

Arran Pearce

So are you saying the way your code works you need to do a round trip to
the server? If you have to do that then SmartNavigation is your only
option. (and in my opinion not a good one, unless you have full control
over your deployment enviroment)

When i talked about the OnClick i was talking about a Client Side
function not the server side onClick event. (just making sure i was
being clear)
 
J

Jeff Johnson

I'll investigate the SmartNavigation. That's the kind of information I was
looking for.

Thanks for taking the time to reply; I really appreciate it.

JJ
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top