?
Solved

SmartNavigation -- Postback

Posted on 2003-03-11
3
Medium Priority
?
502 Views
Last Modified: 2006-11-17
Hi,

1.SmartNavigation:

I have an webform page abc.aspx in which I link to a css file for setting styles to controls on the page. When I set SmartNavigation property to true in the page directive, during the postback the styles set for the controls using the css are not retained. Instead some default styles(font - size, family) are applied. I want the styles from the css to be applied for my controls.  How can this be sorted out?

2.Postback:

Also I have another doubt regarding the postback. I am using an asp:listbox control with multiple items in it, assume 10, and the height of the listbox control is set in such a fashion that only one item is visible all the times(scroll bar appears). Now the problem is, if I select the 5th item and during the postback the 5th item is selected but its not visible. The 1st item in the listbox is always visible. I want the 5th item to be selected and made visible by default during postback. I mean the listbox must be scrolled to the 5th item after postback. Is there any property for this? or How this problem could be solved?

NEED THE SOLUTION URGENTLY.

Regards,
Nallakumar.S
0
Comment
Question by:nallakumar_s
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 1

Accepted Solution

by:
Commodus2 earned 400 total points
ID: 8112184
I came up with this for nr 2:
private void ListBox1_SelectedIndexChanged(object sender, System.EventArgs e)
{
     ListBox1.SelectedIndex = ListBox1.Items.IndexOf(ListBox1.SelectedItem);
}

It shows the selected item. At least in my setup here.

Don't know nr 1 yet. My css stays... even after any postback
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 9671241
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Answered by Commodus2

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

TheLearnedOne
EE Cleanup Volunteer
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A basic question.. “What is the Garbage Collector?” The usual answer given back: “Garbage collector is a background thread run by the CLR for freeing up the memory space used by the objects which are no longer used by the program.” I wondered …
This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question