.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Post New Web Links

retain polygon colour

Posted By:      Posted Date: September 19, 2010    Points: 0   Category :Sql Server


I have 2 qustions concerning a map I build:

1.I have several polygons in a map- each holding different clinics.

The plygon colour is set according to a score each district (polygon) achieved - red - yellow - green.

I also have a parameter allowing to see a specific district with its affiliated clinics .

Can I retain the polygon colour as showed in the nationwide visualization (first step), to a specific district (polygon) visualization (after a district was selected, from the parameter districts list) ?

Right now it is always red, no matter what the polygon colour was in the initial visualizaion.

2 the clinic's lables overlap each other. Can I make half of the clinic lable visible, and the other half hidden - this way the map will look less "crowded"?

The half that has hidden lable will have a tooltip holding it's name, while the second half will have thier  lable property set to its name.





View Complete Post

More Related Resource Links

Retain DropDown,TextBox's previously selected values after redirected from another page.


 Hi People, How are you all doing?

I have 2 pages one is SearchPage & It has DropDowns, textboxes to specify the search criteria. From the search result the user is redirected to another page when he clicks the hyperlink in the search result  where he fills in the information and again redirected to SearchPage. Now the SearchPage is posted back with no state i just want to retain the search criteria and display when user comes back. Please give me some suggestion how to get this done. I've used ViewState to save the values and check them in Page_Load but they are null.   



 Update: I've come up with this code. But the problem is The values are being retained but the Button_Click event is not being handled properly. When i Check the code even after this "DropDownList1.SelectedValue = Session["Name"].ToString();" DownList1.SelectedValue is EMPTY"" samw with DropDownList2 . please Suggest something


    protected void Page_Load(object sender, EventArgs e)
        if (IsControlsEmpty())
            if (SessionExist())
                DropDownList1.SelectedValue = Session["Name"].ToString()

Join 2 flat file data flows - retain unmatched rows

I have two data flows from two separate flat files. They may contain matching IDs (account number), in this case specific data from each flow should be used to create one row. When there is no match, the rows would stand on their own. At the end of the flow, I need both flows combined into one flow, with one record for each key record (account number). If I were able to use a look-up, I could easily union the no-match data flow back into the match data flow and have the desired result. I cannot use a look-up, since the source is flat files, but this is exactly the functionality I am trying to achieve. Solutions I want to avoid: staging tables, and cache transformations. Any ideas are appreciated.

how to retain data in dynamic textboxes

Hello there, more than 24 hours of googling up by now but i hv'nt yet found the commendable solution of my problem. Actually what i searching is ihave a bunch of textboxes created dynamically on the basis of no. of rows in a sql table i put in some data in these textboxes and inserting in other table and here comes the actual problem i have to create the dynamic controls on every postbacks otherwise controls does disappear. other thing i can do is recreate the table on insert button click but in that way i am able to insert the data in the table and recreate the controls but this way text in dynamic textboxes does not remain there. any help in this context would be highly appreciable. thanks in advance  

What is the best way to nest Listviews together and have all listivew columns retain the same width

I have 3 listviews that I need to be come one.  Each listview has a different source, but information from each is used in the other for totals. I have no problem nesting the listviews one after another to look as if they are actually one listview in the end, but I need to figure out a way to make the  columns identical.  What is the easiest way to do that? Thanks 

Jquery.tools tabs doesn't retain tab index on postback

The graphic designer of a project I'm building a web site for chose jquery.tools (http://flowplayer.org/tools/tabs/index.html) for a tabs tool in the site. Unfortunately it seems that the tool doesn't behave properly on a postback in IE7 or IE8 (it does behave properly in FireFox, Chrome and Safari). Does anyone have experience using the jquery.tools with asp.net? and know how to retain the tab index on a postback? I've tried a lot of things and can't get it to work. The code i'm using now is as follows:           $("ul.tabsScenario").tabs("div.panes > div");         var tabIndex = $('#ctl00_ContentPlaceHolder1_EnInDeToekomst1_HiddenFieldTabIndex').val();         $("ul.tabsScenario").tabs('select', tabIndex); where the tab index is stored in a hidden field (HiddenFieldTabIndex). The above code works fine in Firefox, Chrome and Safari, but not in IE7 or IE8. I am using a ScriptManager and UpdatePanels, but in an extremely simple website example I can't even get the jquery.tools tabs tool to work. There are some unanswered posts on the Jquery.Tools forum concerning this topic, but yeah, that doesn't help much. I've already determined that the

Retain previous selection in a modal window when it is reopened within same session

Hi ! I have a modal which have a listbox inside it. I am passing the values through a session to the parent page. Suppose, i made few selections on the modal page and i closed it. I want to see the same selection on the modal page once i reopen the modal window Is there any possibility to retain the previous selection in a modal window? I used <body onload="window.focus();" onblur ="this.focus" > but this doesn't work Any idea please?  

Change background colour based on data key change?

Hi there,I have a GridView with an alternating Css style. The GridView has a column called tradeId. What I want to show is an alternating colour based on a change in the tradeId. Is this possible? It will make it easier on the eye to group trades together by colour. Here's the GridView code as it is right now:<asp:GridView             ID="dtlEntryStats"             runat="server"             DataSourceID="sdsEntryStats"             DataKeyNames="tradeId"             AlternatingRowStyle-CssClass="alternating"            GridLines="None"             CssClass="gridView"            AutoGenerateRows="false"             AutoGenerateColumns="false"             AllowPaging="true"           &n

colour columns in a list

hi, is there a way to colour columns in a list, there is no criteria..I just need column 1 - 5 to be coloured with one colour, column 6 - 7 with another..    

Listview: How to get the background colour changed based on a boolean value in a table

Hi there, I come across the technique on how to apply a different CSS class to make a row stand out from the others. However, the original code is for gridview whilst I am trying to get it works on a listview. The original code for the gridview is as follows and hope that someone can shed some lights on how to get it done on listview. Thanks.-----------------------------------------------------------------------Protected Sub GridView1_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GridView1.RowDataBound Select Case e.Row.RowType Case DataControlRowType.DataRow Dim myRowView As DataRowView = CType(e.Row.DataItem, DataRowView) If Not Convert.ToBoolean(myRowView("Authorised")) Then e.Row.CssClass = "Highlighted" End If End Select End Sub

Cannot retain changes when using excelservices and C#

Sirs, I am fairly new to the sharepoint development coming from  what is described as a hackware c# background.  I am trying to build an application that has two webparts, the first has a left pane which pulls data from and excel spreadsheet and saves data to the excel spreadsheet based on user inputs.  The second pane will be a visio webpart that will update based on the information in the spreadsheet when the page is reloaded. Now for my issue, I am trying to build the framework for the excel functionality.  What I have created is a simple form with three buttons.  The first writes a bunch of data to cells in a spreadsheet.  The second reads the value of the cells.  The third writes different values to the cells.  This way I can run one button to write data, read the data, write different data, and read it again to make sure everything is changing. The problem is that the excel spreadsheet will not update.  If I click the read data button, it is blank.  If I navigate to the spreadsheet in my documents folder, it is unchanged when Click to view it.  However, when I click edit in browser, the changes are there.  When I close it again, and view it in the browser, there are no changes. Does this have anything to do with permissions, impersonation, or the document folder properties?  I am sitting at the server

filter expression/ colour cells


I have a DropDownList the uses the filter expression for the results to be displayed into a gridview.

I also have code to colour the cell colour according to a specified value taken from when the record is created, unfortunately I cannot get this later part to work correctly.


                <asp:ListItem Selected="True">Concern</asp:ListItem>

                ConnectionString="<%$ ConnectionStrings:myDBConnectionString %>"
                FilterExpression="IssueType='{0}'" SelectCommandType="StoredProcedure">
                    <asp:ControlParameter Name="IssueType" ControlId="DropDownList1" PropertyName="SelectedValue"/>

Changing Datagrid Cell foreground colour depending on previous value



I have a datagrid bound to a observable collection and a background thread is regularly updating the collection when an event is fired.( subscribed to a market data service) . I need to change the foreground of the cell value if (Previousvalue > NewValue) . I guess I need a conveter but how can I get access to the previous value ? Or is there a smarter way to do this. Performace is a concern as well.

Thanks v much.


Trying to Retain Values in a FormView When Validations fails or the SQL Fails on an Insert


To me this should be much easier, but I can't seem to retain the values that are put in the Insert template upon a validation failure or when the sql fails. This will prevent the user from having to retype everything agin in the event of a failure.

As you can see I am using the Sub Insert_Click and not using an insert through the wizard. so the fields are unbound textboxes on the form. There are 2 dropdowns that provide choices for the other fields.

Any help would be appreciated. I pasted in the code using the text only option becuase the format was getting messed up. I porboably need more background on why the fields are blanking out.



See Code below



Protected Sub InsertButton_Click(ByVal sender As Object, ByVal e As System.EventArgs)

' Dim sqlparm As String

Dim con As Data.SqlClient.SqlConnection = Nothing

Dim cmd As Data.SqlClient.SqlCommand = Nothing

Dim dr As Data.SqlClient.SqlDataReader = Nothing

Dim sql As String = ""

Dim x As Integer

' Dim x As Integer



If CType(Me.fvwAppSecurityDetails.FindControl("CorpIDTextBox"), TextBox).Text = "" Then

Me.lblMessage.Text = "CorpID cannot be blank"

Exit Try

Else : Page.Session("CorpID&

Retain partial data in model over the post backs


Hello Everyone,

I have recently started learning ASP.NET with MVC 2 Framework, I am facing difficulties in the following scenarios

In my MVC application I want to retain partial information in Model over post backs.

Following is my scenario,

1.    I initiate "Edit" of main record by clicking date hyperlink from left navigation.
2.    Amend some data.
3.    Save the record.
4.    "Edit" sub record of the saved record by clicking another hyperlink from bottom left navigation panel.

The page is divided in to 6 tabs, the first 5 tabs shows the data for the main record and the 6th tab shows data of sub record.  Wehn we "Edit@ sub record the previous 5 tabs doesn't have any changes noted, that means there is no harm in keeping their details intact in the main model.  So is there a way to access model in the controller on hyper link click action so that I can only load the data for the clicked sub record (I am asking this, because the hyperlink click uses HTTP GET method so no model parameter passed in action method). If no, then how do I retain partial values in the Model over post backs?

Note that each tab data have been kept in individual models, and a main model has a collection member to hold all these individual models together.

How to set the text colour for all controls within a content presenter.



In my application I have a custom content control tha I use many times. How can I set the foreground colour (for Text) for all controls that appear inside this control??  Id like to be able to set this once and for it to apply to all the controls that have text (ie textbox,radiobutton, label etc). I dont want to have to set the foreground property for each control defined.

Initially, I thought I would be able to use the Attached property TextElement.Foreground on the content presenter of the custom control however this doesn't work,not sure why either as TextElement.FontSize does work.



How to limit the user Drawing a polygon inside the canvas -- WPF



      I am drawing a polygon on a canvas and the user is free to resize and reshape the polygon. But i want to limit the user so that the drawing always reside inside the canvas.

I know this can be handled through mouse leave. if someone can help with code snippet?

How to set a link in Calendar Control and retain text in the control?


Hi Community

    This is my first time in this forum.

    I have a Calendar Control that I added text that show scheduled meetings on certain dates and it works okay.
The problem is that when I click on a date I need to http to another web page or sometimes goto a web page in
the same web site.  The problem is  when the code that  creates the hyperlink runs it replaces the text displaying "meetings"
scheduled for that date instead appending the link to the date and retaining the "meetings" text that was already there.

fyi, e.Day.Date.Day matches any number entered.

Below is how I set that up with the code that adds the meetings followed by the url code that replaces the meetings text: 

public partial class _Default : System.Web.UI.Page


string[,] vholidays = new

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend