|
HI
Response.End () giving This Error
Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack
Please How to solve?
|
|
|
|
|
This is becasue, the Response.End method ends the page execution and shifts the execution to the Application_EndRequest event in the application's event pipeline. The line of code that follows Response.End is not executed.
Resolution:
For Response.End , call the HttpContext.Current.ApplicationInstance.CompleteRequest method instead of Response.End to bypass the code execution to the Application_EndRequest event.
Find the full detail here:
ThreadAbortException [^]
|
|
|
|
|
Hi,
If you use
1. Response.End,you should try ApplicationInstance.CompleteRequest
2. Response.Redirect,please change it to Response.Redirect(String url, bool endResponse),set endResponse as false. For example,
Response.Redirect ("nextpage.aspx", false);
3. Server.Transfer,please change it to Server.Execute.
Hope this helps
modified 27-May-14 4:41am.
|
|
|
|
|
I divided my application into 2 different web apps. I have created a control in the first web app and i need to reference it in the second application. Is it possible to do so? I am trying to drag and drop the control but when debugging i am getting problems.
Thanks for your help.
|
|
|
|
|
First of all, whether it's a Custom control or a User control? Heading of your query says a usercontrol.
Had it been a custom control, you can include that as a reference and drag-drop it on your designer.
If it's a user control that too in another project, it would be difficult for you to refer. Either include that user control in your project where you need it or design a similar one.
|
|
|
|
|
Thanks for your reply. its a user control. The use of itis to have one control which could be used on both apps. Is there any solution for that please?
|
|
|
|
|
It's a file that can be found in your folders. Since you don't want to create a copy, design the directory of this file such that you can include it in both of your applications!
|
|
|
|
|
what kind of exception is this? how to rectify it?
|
|
|
|
|
Looks like you are trying to access data using a procedure or table valued function and getting this error.
If you check the stored procedure(SP) or table valued function(TVF) then you will find that they expect some parameters in order to run. You are calling TVF/executing SP without suppling those parameters.
Supply them and it will be resolved.
|
|
|
|
|
suppose i have button in my page and i want that when user click on that button then i will call gridview sort event
explicitly with proper parameter. is it possible if yes then please guide me with sample code.
thanks in advancetbhattacharjee
|
|
|
|
|
myGridview.Sort("Column1", SortDirection.Descending);
|
|
|
|
|
Store grids sorting somethng like this:
private SortDirection GridViewSortDirection
{
get
{
if (ViewState["sortDirection"] == null)
ViewState["sortDirection"] = SortDirection.Ascending;
return (SortDirection)ViewState["sortDirection"];
}
set
{
ViewState["sortDirection"] = value;
}
}
OnClick event of the control:
protected void btnClick(object sender, EventArgs e)
{
ViewState["SortExpression"] = sortExpression;
if (GridViewSortDirection == SortDirection.Ascending)
{
GridViewSortDirection = SortDirection.Descending;
SortGridView(sortExpression, DESCENDING);
}
else
{
GridViewSortDirection = SortDirection.Ascending;
SortGridView(sortExpression, ASCENDING);
}
}
private void SortGridView(string sortExpression, string direction)
{
DataView dv = new DataView(dt);
dv.Sort = sortExpression + direction;
gvHours.DataSource = dv;
gvHours.DataBind();
}
|
|
|
|
|
both things is used to store value and can be access from any page. so what is actual difference between session and profile.thanks in advance tbhattacharjee
|
|
|
|
|
|
please help me in asp .net on clicking a button in left frame the data related to it has to appear in right.I want the code also.
http://www.treeview.net/treemenu/demos.asp
http://www.treeview.net/treemenu/3fr_beenthere.html
this the model in which i want that is with frames. but in this link it is provided in java script . but i want the coding in asp.net
|
|
|
|
|
Please post your requirement here. You will definitely get lots of positive responses.
|
|
|
|
|
u plz check the link in that model am designing my website. In that plz select frame layout. I want the coding in asp.net. some of my friends have suggested to use either ajax or javaScrpit. But my requirement is only in asp.net
|
|
|
|
|
You failed to get my point.
|
|
|
|
|
what is ur point? I sent the link because the model in that link is same as what i want?
|
|
|
|
|
His point was that this is not the place to simply ask for free coding work to be done for you. Sandeep below has posted an excellent link to a tutorial to show you how to get what you want.
|
|
|
|
|
well thank u for ur link i shall read it and develop
|
|
|
|
|
|
|
Should we place a panel inside the table or table inside the panel?
|
|
|
|
|
yes, you can put panel in td and table in panel.
|
|
|
|