Showing posts with label user. Show all posts
Showing posts with label user. Show all posts

Wednesday, March 28, 2012

Linebreak appears after update panel submits

I wrote a control that would allow a user to click on a label, and then edit it the value, and send back the new value to the server via an update panel.

However, the first time the value is sent to the server, a line break appears right above the text box, i dont think this is a css error, i can't seem to figure out what is causing it by examining the DOM. This only appears in IE, not Firefox, Any ideas?

Here's the mark up for the Control

<%@dotnet.itags.org. Control Language="VB" AutoEventWireup="false" CodeFile="QuickEditLabel.ascx.vb" Inherits="QuickEditLabel" %><script type="text/javascript"> function<%=Me.hidCurrentFileId.ClientID%>updateNumber(param) { var hiddenField = document.getElementById("<%=hidCurrentFileId.ClientID%>"); hiddenField.value = param; __doPostBack('<%=hidCurrentFileId.ClientID%>',''); } function QuickEditSwap(hideMe, showMe) { showMe.style.display = 'none'; hideMe.style.display = 'inline'; }</script><asp:HiddenField ID="hidCurrentFileId" runat="server" Value="" /><asp:UpdatePanel ID="updPanel" UpdateMode="Conditional" runat="server"> <Triggers> <asp:AsyncPostBackTrigger ControlID="hidCurrentFileId" EventName="ValueChanged" /> </Triggers> <ContentTemplate>   <asp:Label ID="Label1" runat="server" CssClass="QuickEditText" ToolTip="Click to Edit"></asp:Label> <asp:TextBox ID="TextBox1" runat="server" CssClass="QuickEditTextBox" Width="93px"></asp:TextBox> </ContentTemplate></asp:UpdatePanel>

Here's the Code behind for the control

PartialClass QuickEditLabelInherits System.Web.UI.UserControlPrivate myTextAs String Public Property Text()Get Return myTextEnd Get Set(ByVal value) myText = valueEnd Set End Property Protected Sub Page_Load(ByVal senderAs Object,ByVal eAs System.EventArgs)Handles Me.LoadIf Not IsPostBackThen Me.Text ="33"Else Me.Text =Me.TextBox1.TextEnd If Me.TextBox1.Attributes.Add("onchange",Me.hidCurrentFileId.ClientID +"updateNumber(getElementById('" + Me.TextBox1.ClientID + "').value)") Me.Label1.Attributes.Add("onclick", "QuickEditSwap(getElementById('" + Me.TextBox1.ClientID + "'), getElementById('" + Me.Label1.ClientID + "'))")End Sub Protected Sub Page_PreRender(ByVal senderAs Object,ByVal eAs System.EventArgs)Handles Me.PreRenderMe.Label1.Text =Me.TextMe.TextBox1.Text =Me.TextEnd SubEnd Class

Here's the css i'm using for the control

 .QuickEditText {font-family: Verdana;} .QuickEditText:hover {text-decoration: underline; font-family: Verdana; cursor: pointer} .QuickEditTextBox {display: none; font-family:Verdana;}

Thanks in advance for any suggestions,

This is happening because of the default setting of the UpdatePanel's RenderMode property - which will render its contents into a <div> the first time. Try changing it to "Inline" so that it will instead render a <span> element.

link buttons in user control not recognised by updatePanel

Hello...

I have a usercontol that has some linkbuttons.....and an updatePanel...i put the linkbutton ID's in the Trigger section of the updatePanel, but I'm getting an error that the updatePanel does not recognise the button ID's I have passed in...

how do I fix this? thanks

Hi,

Update Panel is not gonna recognize those link buttons because they are inside of usercontrol. You need to create user control event for each link button event. For example,

CustomControl.ascx

<%@. Control Language="C#" AutoEventWireup="true" CodeFile="CustomControl.ascx.cs" Inherits="CustomControl" %>
<asp:LinkButton ID="lnkTest" runat="server" OnClick="lnkTest_Click">Test Button</asp:LinkButton

CustomControl.ascx.cs

public partial class CustomControl : System.Web.UI.UserControl
{
public delegate void TestHandler(object sender, EventArgs e);
public event TestHandler LinkClicked;

protected void Page_Load(object sender, EventArgs e)
{

}
protected void lnkTest_Click(object sender, EventArgs e)
{
if (LinkClicked != null)
LinkClicked(this, new EventArgs());
}
}

test.aspx

<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<Triggers>
<asp:AsyncPostBackTrigger ControlID="CustomControl1" EventName="DoYourBussiness" />
</Triggers>
<ContentTemplate>
<uc1:CustomControl ID="CustomControl1" runat="server" OnLinkClicked="DoYourBussiness" />
</ContentTemplate>
</asp:UpdatePanel


Hi,

thanks for this, how about for normal hyperlinks?... (instead of linkButons)... can something similar be done?

thanks


Hi,

Normal hyperlinks do not have OnClick event. LinkButton looks the same as HyperLink, but has OnClick event.

Linkbutton in asp:reapeater - all in user control, needs to register linkbuttons with ajax

I have a master page with the ajax script manager on it.

the master page then has a user control, which contains an asp:repeater which renders asp:LinkButtons on the page, i need them to be registered with the script manager so that they will only cause page re-renering in the content.

The problem i am facing is getting access to the ScriptManager in the master page fron theRepeater1_ItemCommand event in the user control.

Any thoughts, THanks

To programmatically access the scriptmanager:

Dim sm as ScriptManager
sm = ScriptManager.GetCurrent(Page)

Linkbutton inside accordionPane header

Hello.

I have an accordion with some panes. In panes header I have a text and a linkbutton. I want to open a pane when user clicks on text, but I don't want to open (or close) the pane when user clicks on linkbutton. When user clicks linkbutton the pane must not move.

Anyone knows how can I do it?

Thanks!!! and sorry for my english (greetings from Spain! :D)


I would also like to know. Looking at the source code I cant seem to find anything short of re-writing in javascript a number of functions.

Rather disappointed with the level of support for these kind of things this control has.


Please someone can help us? :-(


Hi,

The reason and solution has been discussed in this post: http://forums.asp.net/p/1133424/1809338.aspx

Please try it.


I searched before but i didn't find it.

THAT WORKS!!!


THANK YOU A LOT!Cool

linkbuttons in accordionpane header

I am using an accordion that is created dynamically for a menu and have it working as I want - with one exception. When the user clicks on a dynamically created link button on the header, I want to redirect to another page WITHOUT triggering the default action of the accordionpane (expanding or collapsing). Is there any way to accomplish this? Currently, it triggers the default action of the accordionpane (expands or collapses it) then redirects.

Hi,

The expand/collapse action is fired by the <div> element that the header is wrapped in.

When you click in anywhere in the header, it's fired.

When you click on an element in the header, the element's click will be bubbled up to its parent( the header div ) , thus default action is fired too.

So, you can use javascript to prevent the LinkButton to bubble up the event to prevent this from happening.

The following code snippets help to illustrate my idea.

<script type="text/javascript">
function doSomething(e)
{
if (!e) var e = window.event;
e.cancelBubble = true;
if (e.stopPropagation) e.stopPropagation();
}

</script>

<ajaxToolkit:AccordionPane ID="AccordionPane1" runat="server" HeaderCssClass="myclass">
<Header>
<a href="http://links.10026.com/?link=">1. Accordion</a><asp:LinkButton ID="LinkButton2" runat="server">LinkButton</asp:LinkButton>
</Header>

protected void Page_Load(object sender, EventArgs e)
{
LinkButton2.Attributes.Add("onclick", "doSomething();");

}

Hope this helps.

Linked List of Hover Menus

Say I have a hover panel with a bunch of links. When the user hovers over a link, the same hover panel should appear with the same links, and again when the user hovers over a link, the panel appears for the 3rd time, and so on...

For example, say my Panel has Links A, B, C, D, and E. If the user hovers over link B, a panel should appear with the links A, B, C, D, and E. Again, say if the user clicks on link C, the panel appears again with the same links...this way the user can form a linked list of items that were hovered over. For example, B-->C-->A-->D. When the user final clicks on a link (instead of simply hovering), that would signal the end, and a reference to the linked list (B-->C-->A-->D) needs to be posted back to the server.

My questions are:

1. How do I achieve this dynamic hover menu effect?

2. How can I maintain the list of links that were hovered over each panel, so that I can finally postback the set of links hovered over to the server.

I'd appreciate if anyone could help me on this. I am creating a website that needs this functionality.

Thanks!

This sounds like it may get more complicated than you want. I'd look at maybe creating the hover behaviors on the client so that you can handle the arbitrary nesting that results after the user makes a few choices.

Monday, March 26, 2012

ListSearch with ~15,000 items under dropdownlist

I have a dropdownlist with around 15,000 items, which can be quite irritating for a user to select the right item.

So, I put in ListSearch to facilitate the selection process, but now I'm noticing that there's about 5 second delay from the moment I start typing the first few characters of the item and the time I actually see the typed characters below my dropdownlist. And 5 seconds is way too long of a delay!!

When I tried the same ListSearch on a dropdownlist with a fewer number of items (say...about 100), then it worked instantaneously.

Has anyone seen similar problem? And how can I make ListSearch work faster?


Thanks.


Hi,

The ListSearch delays any processing until the first time the user starts typing. This is by design (on a number of our components) because if you put a few dozen components in a repeater you don't want them to all do their processing at once when the page loads. I'm a little skeptical that you really want to put 15,000 items in a drop down (instead of providing a search/results selection UI with something like modal popup), but you could probably tweak the ListSearch beahvior pretty easily to start processing the items in its initialize function.

Thanks,
Ted


I agree with you. Putting more than 15,000 items under a dropdownlist is an overkill, but I'm currently migrating our old ACCESS application to ASP 2.0 and it is required to stay with the same dropdown control. Apparently, ACCESS's version of dropdownlist can handle 15,000 items and has the capability of search incrementally. So, I'm kinda stuck with a dropdownlist here. :-(

I guess the users don't want to go through few more clicks with the search/results selection page.


With that aside, what did you mean by "tweaking ListSearch"?? Would you be able to show me an example or direct me to some website where I can look into?

Thanks for your help.

-Brian


Hi,

Get the full source version of the Toolkit and look at the AjaxControlToolkit\ListSearch\ListSearchBehavior.js file. You can experiment with moving the _isSorted check (line 242) from _onKeyDown to initialize (remember to rebuild when you change one of the scripts as they're embedded resources). I think this would help fix the delay you're seeing the first time a user accesses the list.

Thanks,
Ted


Thank You!


I've written a blog post explaining how you can alter the ListSearch Extender to speed up the initialization by giving it a hint as to whether the target list is sorted or not. It is the determination of whether thie list is sorted or not that takes a long time.

http://damianblog.com/2007/06/19/speeding-up-listsearchextender/

If there is enough interest, I'd be happy to add the changes to the control toolkit.


Thank you for this. I will definitely take a look at this and hopefully I'll get the ListSearch Extender to work faster.

-Brian

Saturday, March 24, 2012

Load content on demand or in portions

Hi,

I have large chunks of text (400-500Kb) that are loaded inside update panel when user clicks on a tree node with the book name. It works fine and all. The only thing is that the text is first downloaded to client and then shown - the user will have to wait for the whole 400Kb of text to download. Is there a way to show the first 5-10Kb of text once it has reached the client and keep loading the reast while user is reading?

And one more question - is this ok that Page_Load() event is fired every time UpdatePanel is updated?

Hi abolotnov,

To start with your last question it is normal that the page_load event get fired when you are doing a partial update. The trick is within the rendering of the HTML, so thats correct. What kind of control is inside your UpdatePanel (treeview?) You can use a updateprogress control to make clear to the user that the page is still updating. Can you past some code here so we can analyze your code. Thanks

Regards,


yeah, I know I can use UpdateProgress control to tell the user that the page is still updating... this is not I really want though -

say I have this UpdatePanel with DIV inside of it and need the text in DIV to be updated. The text is 400K - quite a lot for people with slow internet connection (dialup for example). I want them to be able to start reading the text before it's downloaded in whole. Say, if their connection speed is 4K/sec, they will be able to start reading in 1 second - 4K of text gives them enough to read before the rest is downloaded - another 4k will come next second etc.

What I have now is when the update starts use sees this message "content for reading pane is being updated, please wait" untill the whole portion of text is downloaded and then rendered. For people on slow internet connections it takes quite a while 400/4 secs.


Don't ask me why I can't split the text into smaller portions and allow users to page through the text - I will if there is no way to sort out what I want.

Thanks for any comments you may have on this.

Load data into server controls

I am using Atlas to get a list of Serial numbers from a database as the user types in part of the serial number. It works great. Now I want to be able to populate other textbox controls on the form as the user types in that serial number. Is this possible using Atlas? I know I could put a button next to the serial number so when they get the serial number they are looking for they could submit the form and I could do a "SELECT * FROM inv_assets WHERE sserial_num = txtSerialNum.Text, but this would cause the page to refresh and I would really like to somehow populate the rest of the form as the user types in the serial number.

perhaps using a placeholder into an updatepanel.

load external url in page?

I have a treeView that lists SQL Reports available to the user. What I'd like to do is put the treeView into an Update Panel, and some other control that can display an external url, next to the treeView so that when a user clicks on a report, it fetches the contents of the url and displays it without doing a postback. So my question is, are there samples of this out there (I couldn't find any) and if so, what control would allow me to load external content into it (like an iframe)? I realize I could do the same thing with a div or iframe using javascript, but I'd like to use ajax if possible...

Thanks!

eddie

Chao,

I would put the iframe inside the UpdatePanel and the Trigger controling the URL's ID from the treeview. This is similar to having a gridview or any view inside an UpdatePanel with a trigger controlling a button. The button is of course outside the UpdatePanel.

WS

p.s. not responsible for not working ... hihihi ... but that's how i see it.

Load in-line javascript functions after UpdatePanel refresh

I have a lot of user controls that have in-line javascript functions specific to the content of the user control, validations and automated reactions. This javascript is written mostly by client side developers. Is there any way to allow them to keep writting their in-line javascript on the user controls, but still have that javascript be active after an updatepanel conditionally makes the user control visible? For example imagine a page with a button and the user control. The user control is in an update panel tiggered by the button click. When clicked the user control has its visibility set to true and the user interacts with the newly visible controls contained within. Because the user control was initially in an update panel, the original page source does not contain the in-line javascript functions so they are never evaluated by the browser. In order to keep the client side group's functionali i've had to recreate the client side code on the server side by building a large string that references controls using the control.ClientID property (just like the client side group does with inline scriplets $get(<%= control.ClientId %>) and then registering this string on the page with ScriptManager. This is too inefficient a process and having the javascript placed on every page that uses the user control seems counter productive with regard to user controls. Placing all the javascript in external files that get loaded by ScriptManager is also not an option as the javascript is often control specfic. Is there no way to get the browser to recognise the in-line javascript after an update panel loads it? Is this something that is planned for the future if not?

Well, I don't know if it is the final solution, but I figured that I could use display:none and display:block on a panel wrapping the user control instead of using the Visible property on the control itself. This way the control (and most importantly the javascript) is initially rendered, but not browser visible. If there is still some way to use the built in Visible property to do what I want, please let me know. I like that the inital page load using the Visible property doesn't have the extra weight of controls that are not usuable.


You can give this approach a try:http://blogs.msdn.com/sburke/archive/2007/06/13/how-to-make-tab-control-panels-load-on-demand.aspx

-Damien


I believe that approach will suffer from the same issue. The tabcontainer content will not be initially visible and so any inline javascript contained in a tabcontainer will not be evaluated by the browser.


Sorry about that I miss read your question. If the JS is embedded in the usercontrols they need to be loaded, so your solution works. I'm a bit confused why you need the JS loaded if they are control specific. Sounds like there may be a design problem with your solution.

-Damien

Load Tab Content when user selects the Tab

Hello,

I am creating a web page with two different tabs. The data for both tabs is from single aspx file under a single Content.

How can i make my second tab load its content when user clicks it?

Regards

HI .

When you click on one Tab . data will be populated from DataBase or its only Static Content .IF it is Static Content then Use Div for Each Tab and Clicking on tab Show one Div and hide another div


Both tabs are Gridviews data (data populated from database).

As of now, my page has both grids loaded with data and it just loaded once from the server.

But like i said, i need the second Tab only populated when user clicks it.


take a look at this link... its help ful

http://mattberseth.com/blog/2007/07/how_to_lazyload_tabpanels_with.html

Wednesday, March 21, 2012

Load User Control into Modal Popup

Hi

New to .net / ajax etc but have had some joy and got several bits working.

I am looking for an example of how to load user controls into modal popup, for example, I have two buttons, 1 will load user control1, and button2 will load user control2 into modal popup.

Many thanks for help.

Richard.

An approach for this is to use an UpdatePanel inside the ModalPopup, seehttp://blogs.technet.com/kirtid/archive/2007/05/03/using-updatepanels-with-modalpopups.aspx and then you can load the User Control into the UpdatePanel:http://geekswithblogs.net/rashid/archive/2007/08/11/Loading-UserControl-Dynamically-in-UpdatePanel.aspx

-Damien

LoadControl issue with UpdatePanel ?

Hi,

I have a very strange problem. I'm trying to decrease traffic on a web application. To do so, i'm adding some UpdatePanel in some user controls of our app.
No problem with the first controls i modified. I had the behaviour not modified while trafic was much better.

But i have a problem with the last control. I added some update panels on it (more than with the others). Finally, there are 14 Update panels in my user control (may be one of the most complicated in this application). The user control is loaded dynamically (using LoadControl), and it worked without problem before i added the update panels. After that, the LoadControl doesn't even call the OnInit() event, and directly goes to the CreateChildControls (where the controls are not then initialized.

I have found no information about such a problem. Does anyone have information about this kind of problem ? Is there a known issue on UpdatePanel about this?

thanks for your help.
Guillaume

Hi,

I think this is an old question,It is something about Dynamicaly loading User Controls into UpdatePanel.

You can see the following threads too:

http://forums.asp.net/p/1156704/1906671.aspx#1906671

http://forums.asp.net/t/1108394.aspx

Best Regards,


Thanks for your answer.

Unfortunately, this is not where my problem is. I repeat that i have my original control, already dynamically loaded, wich works fine.

This is only after adding all update panels (I know this is too much, but i do what i can with what i have) that controls inside my dynamically added control are not initialized (variables are null) and the first event called on the control is CreateChildControls... Any idea about the source of my problem? For me, it's like if there were a limit number of UpdatePanel... but it may be something else. I have no idea and found no resource on this problem (that's why i posted)...

Thanks


Hi,

If you dynamically add your usercontorl into an updatepanel, the issue comes.

Good luck!


See this

http://geekswithblogs.net/rashid/archive/2007/08/11/Loading-UserControl-Dynamically-in-UpdatePanel.aspx


Thanks for your answers. I finally managed to do what i wanted. The issue seems to be due to the use of Triggers. When i removed the triggers (and made the work programmaticaly), it fell working :).

I think there's a problem with triggers though :(.

loading another page using AJAX

Hi All,

I am new to AJAX. I have two pages:login.aspx andindex.aspx. I am able to redirect user from login.aspx to index.aspx after successful login. But I would like to know is there any way to load index.aspx over login.aspx (so that it should not post back the page). Means, when I redirect user from one page to another page, browsers Back button gets enabled because page is being changed. If page gets loaded over same page using AJAX then there will be no post back. So, browsers Back button will remain disabled. Is there any way to do this?

Thanks

Sumit

Hi Sumit,

Well there is no way that you can redirect to other pages without a page flickering. Ajax supports partial page updates which means that parts of page can be refreshed but the user stays on the same page. There is a control available which is called "history" this control should make the back button available.

Hope this helps.

Regards,

Loading Async User Controls

I have a web page with multiple user controls which causes my page to load slowly. I've been trying to upgrade the page so that the main parts of the page loads then each user control loads seperatly in an async manner similar to what the mighty pageflakes.com does. I've been search for example on how to do this for the past 3 days, and keep coming up with nothing. Can somebody please point me into a direction or give me an example on how I can load my main page, then load each control in an async manner?

Thanks,
Brandon W.

Look at the AJAX frameworkhere. It'll be a lot easier if you're using web services to feed your data directly to the user controls, but you should be able to leverage the AJAX stuff to get the behavior you want.

loading content in Accordion Pane Dynamically

Is it possible to dynamically fetch the content when a user clicks on a header of the accordion pane?

The content for the accodion panes in my solution is rather large and I would only like to show it for the selected panes.I would like to show the headers and all of the panes collapsed initially. But when a user clicks on the header, I would like to dynamically fetch the content and show it just for that pane.

An example or tips on how to do this would be much appreciated.

Thansk,

jsidhu

Hi Jsidhu,

Please refer to this thread: http://forums.asp.net/p/1129397/1792511.aspx

It implements a similar function on ModalPopupExtender, you can easily apply it to Accordion.

Loading Controls usning Ajax after loading the main page

I saw this technique on some pages. The point is that my page is loading very slow due to many user controls on it. Would it be possible to load the page first without the user controls and than load the controls, maybe via Ajax invocation (Update Progress). Any idea how to acomplish this? Any samples?

See this

http://mattberseth.com/blog/2007/06/aspnet_ajax_canceling_an_async_1.html


That is not what I was looking for. This is the INITIAL load page process I am talking about. I want to load the whole page first, but without the controls (those take long to load). After the page loads, I want to automaticly execute loading of controls in Ajax manner (with Update Progress)...


I'm interested in hearing options for something of this kind as well.

For my situation, Im communicating to a workflow, which feeds me a collection of controls to be rendered on the page. However, I can not get the collection until an event is handled from the workflow. At present, this means I have to make two round trips for the whole page in order to render the controls handed to the page.

I have attempted triggering a partial page update, but with out any luck in getting the controls to render.


Hi,

This is what you need:Start callback immediately after page loaded

For more information about this topic,seeDelaying Content Load using Timer and UpdatePanel ANDControlling visibility of contents of collapsiblepanel

Best Regards,


Thanks a lot! This is exactly what I was looking for! I like the solution with Update Panel and Timer, as it seems the most "clean" for me:http://smarx.com/posts/delayed-load-with-an-updatepanel.aspx

I will send you the link to the page once I done coding. Excellent!


Ok, I have implemented this on my websitewww.zikbay,com. It is loading Featured panel data as delayed using Ajax Timer technique. I have realized also more use for the Ajax Timer control :)

I have also realized there is no point in having modal progress dialog. It is as good as the old Postback, just little faster and looks much nicer. But the user still losses the possibility to interact with the page when the data is loading... I guess that was the reason why ASP>NET AJAX team removed it after Beta:) I was always wondering why would they remove it. I gues they did not want people to start using it by default:)


Delayed is not working correctly if I place it on my master page (for the location control) and than run search page (with grid). I think this has something to do with this mix: AjaxTimer (master)+Updates Panel (master + search page)+ Griodview...

This is the message I am getting:

"Too many users connected to server"


Thanks for providing linkSmile

It will really helpful to me & other people


So do you guys think it makes sense to use modal update progress? I see they use it on codeplex all over? Yet for example google is not using it... I thought to use it maybe little against the whole Ajax idea of allowing the user to interact while the page is loading. wonder what your opinions are on this one...

Loading data from popup to parent window without refreshing the parent window.

Hi all,

I have a requirement to pass data from a popup window to the parent window. There is an order entry screeen. The user has to select a customer before entering the order. On clicking the search customer button, a popup will open up where the user can do the search. The user will select a customer and the selected customer details should be passed back to the parent window without refreshing the parent window.

How can this be accomplished? Kindly help me as this is a very urgent requirement.

hello.-

not really an ajax question. lots of examples out there that show this. here's one:

http://www.eggheadcafe.com/articles/20060117.asp


Hi Luis,

Thanks a lot. I will try to implement as mentioned there in the website. if I have any queries, I will get back to you.

Regards

Anup


Hi,

Do it like this:

mother.aspx:

<%@. Page Language="C#" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">

protected void Page_Load(object sender, EventArgs e)
{
Label1.Text = DateTime.Now.ToString();
}
</script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Caller</title>

<script type="text/javascript">
function popup()
{
window.open("Popup.aspx", "children");
}
</script>

</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="sm" runat="server" />
<div>
<input type="button" value="popup" onclick="popup()" />
<input type="button" value="Button" id="Button1" />
</div>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Label ID="Label1" runat="server" Text=""></asp:Label>
<div style="display: none">
<asp:Button ID="Button2" runat="server" Text="Button" /></div>
</ContentTemplate>
</asp:UpdatePanel>
</form>
</body>
</html>

children.aspx:

<%@. Page Language="C#" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">

protected void Button1_Click(object sender, EventArgs e)
{
Label1.Text = DateTime.Now.ToString();
}
</script>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
<script type="text/javascript">
function callback()
{
window.opener.document.forms["form1"].elements["Button2"].click();
}
</script>

</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click"OnClientClick="callback();" Text="Button" />
</ContentTemplate>
</asp:UpdatePanel>
</div>
</form>
</body>
</html>

For more information,seecross window update the update panel

Best Regards,

loading page and click in any button

I am facing this problem lot , when page is downloading content and in between this user click on any link then we got error page.

and this error details insert in the database

System.Threading.ThreadAbortException: Thread was being aborted.
at System.Threading.Thread.AbortInternal()
at System.Threading.Thread.Abort(Object stateInfo)
at System.Web.HttpResponse.End()
at System.Web.HttpResponse.Redirect(String url, Boolean endResponse)
at System.Web.HttpResponse.Redirect(String url)
at framework_GacStore_OrderList.GetGACOrderList()
at framework_GacStore_OrderList.Page_Load(Object sender, EventArgs e)


Would you mind posting the code?


Hi pawan_mca03

I am afraid we cannot find out the exact root cause without further information .So I suggest that you'd better share your source code here. If your problem has been resolved , Sharing your work will be greatly appreciated.