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

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

when webform contents changed, a new IE window opens with new contents. why?

Posted By:      Posted Date: September 02, 2010    Points: 0   Category :ASP.Net
I am implementing a web form, and when a checkbox is clicked, contents of the form are changed (i.e. additional checkboxes are being selected), and webform is refreshed to show the new contents. however, instead of displaying new contents within the original IE window, a new IE window is openned with new contents, and the old window remains there without any content update. i did not request for window.open or provide a _blank to specifically indicate a redirect should go to a new IE window. I just want the original IE window being refreshed to reflect the content changes. i have worked with asp.net for years and i think that be default refresh of the webform to reflect new changes always stay in the same IE window and thus never pay attention on how to open or surppress a new IE window? i think it is some config, but don't know what config and where i should look for it. please help thanks michael huang    

View Complete Post

More Related Resource Links

XMLSerializer don't handle mixed contents properly

mixed content model allows a combination of text and elements in the XML document. we use .net xmlserializer to serialize/deserialize the XML. XmlSerializer don't handle mixed content properly. XmlSerializer handles mixed content models to a degree. XmlSerializer add the text in the xml document, but the position of text is not exactly where they appeared in the original XML document. Let's take a example here is original xml <employee xmlns="http://example.org/xmlserializer">   here is some text...   <id>333-33-3333</id>   here is some more...   <name>Bob Smith</name>   and here is even more... </employee> We deserialize above xml using the xmlserializer then we serialize it back into xml. Now xml document is changed as follows <employee xmlns="http://example.org/xmlserializer">    <id>333-33-3333</id>   <name>Bob Smith</name>   here is some text...   here is some more...    and here is even more... </employee> You see the position of text is changed. I have seen the Microsoft code to serialize/deserialize the xml through reflector. They put text in a string array but position is not saved. Is there any solution or workaround? I don't want to parse the xml by xmlReader. I want fix in the Microsoft generated classes that ar

Window.Open in AJAX Accordian Panel Opens Link in Same Window

I'm using the following span to open a page in a new window. What is INCREDIBLY odd is that it is exactly the same code from three different pages, but the first refuses to open in a new window. The only difference is that the first example resides within an Ajax Accordian Panel so I suspect that it might be an Ajax related issue. Ideas? Does not open in new window.<span onclick="window.open ('http://[domainname]/Mercury/production/content/directory/DirectorySideBar.aspx','mywindow','width=271,height=498,scrollbars=no');">   Opens in new window<span onclick="window.open ('http://[domainname]/Mercury/production/content/directory/DirectorySideBar.aspx','mywindow','width=271,height=498,scrollbars=no');">   Opens in new window<span onclick="window.open ('http://[domainname]/Mercury/production/content/directory/DirectorySideBar.aspx','mywindow','width=271,height=498,scrollbars=no');">  

How does one print the contents of a tabpage?

a usercontrol on a tabpage draws a bar and scatter graph. Is there a way to capture the image of what is seen on the tabpage so the user can open up a menu item and send the image to the printer? Thank you, Greg

Treeview - how to change node icon depending on node contents

I have a treeview in an MVVM application: <TreeView ItemsSource="{Binding RootNodes}"> <TreeView.ItemContainerStyle> <Style TargetType="{x:Type TreeViewItem}"> <Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" /> <Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" /> <Setter Property="FontWeight" Value="Normal" /> <Style.Triggers> <Trigger Property="IsSelected" Value="True"> <Setter Property="FontWeight" Value="Bold" /> </Trigger> </Style.Triggers> </Style> </TreeView.ItemContainerStyle> <TreeView.ItemTemplate> <HierarchicalDataTemplate ItemsSource="{Binding Children}"> <TextBlock Text="{Binding NodeName}" /> </HierarchicalDataTemplate> </TreeView.ItemTemplate> </TreeView> The treeview is bound to an ObservableCollection called RootNodes. Elements in the RootNodes collection expose a member "NodeName" which is the text for the nodes in the treeview at runtime. They also expose a member called "NodeType", effectively an enumeration that indicates what type of icon should be displa

How to show list contents in two different sites

hello, how can i show list items in a two different sites..if i have a announcement list in my main site how can i show the  contents of the same list in another site ? i know we can use the webpage viewer but its not a good choice i want to show the list as same as it displayed on my source page...thanx

How to save and update the contents in a datatable

Hi, I am having problem in updating the contents of my datatable in datagrid. When i run the program and edit the contents of the rows in my datatable they remain there, but when i close the program and run it once more they are set back to their original predefined contents. Please tell me that how can i save the edits made at runtime in my datatable. This is the code for my program. Please review it first: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms;   namespace WindowsFormsApplication5 {     public partial class Form1 : System.Windows.Forms.Form     {         private System.ComponentModel.Container components;         private Button button1;         private Button button2;         private DataGrid myDataGrid;         private DataSet myDataSet;         private bool TablesAlreadyAdded;         public Form1()         {             // Required for Windows Form Designer support.             InitializeComponent();        &n

change contents of page based on choices

Hi,I am using AppCode and have 6 arrays of information I want to display on my web page. However I only want three to be visible at any one time. ________________________________ |                    |                       |                 | |                    |                       |                 | ________________________________      button             button            button i.e. a table like the above.   I have created the layout and the choice buttons etc I am using querystrings to pass the changes to the webpage.The problem comes however when trying to write the code for the table diplay. Now each has a slightly different layout.My initial thought was to write

changing font color on a data column field based on the contents

I am trying to change font color if the datafield has the string EMERGENCY. This is my original template field: <asp:TemplateField HeaderText="Type" SortExpression="DigType"> <EditItemTemplate> <asp:Label ID="Label1" runat="server" Text='<%# Eval("DigType") %>' ></asp:Label> </EditItemTemplate> <ItemTemplate> <asp:Label ID="Label1" runat="server" Text='<%# Eval("DigType") %>' ></asp:Label> </ItemTemplate> </asp:TemplateField>   and this is what I thought would work: <EditItemTemplate> <asp:Label ID="Label1" runat="server" Text='<%# Eval("DigType") %>' ForeColor='<%# IIf(Eval("DigType")="EMERGENCY","Black", "Red") %>'></asp:Label> </EditItemTemplate> <ItemTemplate> <asp:Label ID="Label1" runat="server" Text='<%# Eval("DigType") %>' ForeColor='<%# IIf(Eval(&quo

Search cannot find contents of the PDF file

I have small SharePoint 2010 Server with 2 servers. Steps I made: 1. I have Downloaded and installed Adobe’s 64-bit PDF iFilter to the Front-End machine 2. I have downloaded Adobe PDF icon and inlucluded to the DOCICON.XML. 3. I have added PDF as supported file type 4. I have restarted IIS 5. I have made full crawl 6. Crawl log showed no errors. All items were succesfully crawled. Results: A) PDF icon displayed b) Search based on PDF document name works fine C) Search based on words inside PDF document is not found. What should I do? Reference: http://www.sharepointsharon.com/2010/03/sharepoint-2010-and-adobe-pdf/Kenny_I

How to determine the contents of a variables in precedence constraint editor?

Hi All I am trying to create a precedence constraint on one of my SQL tasks, basically all I need to do it find out if a user variable (string Value) is equal to 'no'. I have tried and came up with this: @[User::NewMonth] = "no" However, as I am unfamiliar with the syntax, this is wrong and I get an error. Can anyone help or point me in the right direction? Thanks BigGopher  

Filtering the Table of Contents Web Part

Hi there, I'm trying to filter the Table of Contents web part so that it only shows a list of sites; excluding the documents, lists, discussions, etc... This is on our projects site, and will be used to show a list of projects. I've scoured the net for quite some time and found some people trying to do the same kind of thing, but couldn't seem to get their custom xsl template to do the trick. I'm by no means an xslt expert, but I believe the answer lies in adding a custom style template that will filter the resultset in the LevelStyle.xsl file? Please help!!!

Create a custom search for searcing contents of a sharepoint list

Hi, I am new to sharepoint, i am working on a assignment to create a custom search for a specific sharepoint list . I would like to implement a search by multiple filter criteria's. I am using sharepoint 2007 and with no administrator privileges to the sharepoint server. Can someone guide me with this request. Thanks,  

refreshing (reloading) the self page when it opens the popup window

silbut = e.Item.FindControl("button4")         silbut.Attributes.Add("onclick", "window.open('firmaus.aspx?i=" + rrid.Text + "&s=" + Session("firma").ToString + "')") Hi all,I add an attribute on data bound event to the datalist with following codein studentlist.aspx page :deletebutton = e.Item.FindControl("button4")deletebutton.Attributes.Add("onclick", "window.open('studentus.aspx?i=" + rrid.Text + "&s=" + Session("studid").ToString + "')")but i want deletebutton to refresh parent page (studentlist.aspx) when i click it, with openning the page (studentus.aspx...)how can i add this attribute?thanks for helps.

Search Server 2010 Express Error when crawling LOB Data with BCS Error while crawling LOB contents.

Ok so search server is crawling our BCS external data source which has some columns that allow null. When it hits a null in one of these columns it dies out with: Error while crawling LOB contents. ( '.', hexadecimal value 0x00, is an invalid character. Line 94, position 11. ) This is in the crawl log Is the a Fix / Update / Work around for this (other than modifying the table, taking off allow nulls and using a "blank" default value)

BDC model in Search Server 2010 indexing error - Error while crawling LOB contents. ( Not a valid Wi

I have created a .NET connector assembly that pulls data from an in-house .asmx web service.  I have successfully created an external list in a search center site that displays this data without problem.   However, I've run into an error and a warning when indexing this list in search server 2010 for which I cannot find much information.  I've configure a content source with LOB data as the content source type and select my external data source from the list. After running a full crawl, I receive this error: Error while crawling LOB contents. ( Not a valid Win32 FileTime. ) And this warning: The content for this address was excluded by the crawler because this item was marked with a no-index meta-tag. To index this item, remove the meta-tag and recrawl. My .NET connector assembly looks like this:   public static WeatherEntity ReadItem(string id) { foreach (WeatherEntity entity in GetAllEntities()) { if (entity.LocationAbbreviation == id) { return entity; } } return null; } public static IEnumerable<WeatherEntity> ReadList() { return GetAllEntities().ToArray(); } public static List<WeatherEntity> GetAllEntities() { List<WeatherEntity> weatherEntities = new List<WeatherEntity>(); WeatherService.WeatherWS service = new WeatherService.WeatherWS(); WeatherService.DsWeatherDa

Populating a dropdown box with contents based on the selection of another dropdown box

Hi All   I am a complete newcomer to ASP.NET.  However in the few weeks I have been playing with it I have got pretty far and  have mastered things like stored procedures, gridviews, formviews and templates.  I have come across a problem which I am struggling with and could do with some help!  The scenario is this:   I have a dropdown box which is populated from SQLDataSource1   I have a second dropdown box which is populated from SQLDataSource2, but i need the query feeding this to be dependent on what was selected in the first dropdown box.    I assumed it would simply be a case of modifying the select statement on SQLDataSource2 using the SelectedIndexChanged event on the first DropDownList to update the second SQL source, but I cannot work out for the life of me how to do it.  Pretty much all of the code I have is ASP.   Is there a way I can do this purely in ASP rather than using VB behind the scenes or do I need to use VB?  I am pretty comfortable with vb.net but one of the other issues I have is referencing an ASP object from VB... so for instance if I had a text box in ASP, how can I read or change the properties of this object from VB?   FYI I am using Visual Studio 2010 and SQL/Server   Any help much appreciated!!!   Sean   

how to merge contents of a form library and picture library into a report (word or pdf) document

Hi all           I want to generate a report  containing data from a form library and pictures from a picture library. I am able to generate ms word report from data filled in form library using http://www.bizsupportonline.net/infopath2007/convert-infopath-form-into-word-2007-document-xslt-c-sharp.htm . . But now actually i need to merge images from a picture library into that word  document . thnxs 
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