|
Getting Parser error when running Web Application on Internet
----
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Could not load type 'Home_2'.
Source Error:
Line 1: <%@ Master Language="C#" AutoEventWireup="true" Inherits="Home_2" Codebehind="Home_2.master.cs" %>
----
But it is running on local host
|
|
|
|
|
Did you also copied the App_Code and bin directory? It seems that the Home_2-class is missing.
|
|
|
|
|
Hi
I am try to remove session variable value on a button click how i remoove it. as i prviusly try these
Session.RemoveAll();
Session.Remove();
Session.Clear();
Session.Abandon();
but when we go to back button and travel privious pages session varable value shows always on label control.
|
|
|
|
|
|
gauravems wrote: Session.expire();
What it will do ?
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
it's giving error
System.Web.SessionState.HttpSessionState' does not contain a definition for 'expire'
|
|
|
|
|
Hello,
In many website / CMS i have seen, on the bottom of the page it displayed as
"Generated in 0.0340161323547 seconds."
How to do that in ASP.NET?
|
|
|
|
|
Just define a HttpModule,
public class TimingModule : IHttpModule {
public void Init(HttpApplication context) {
context.BeginRequest += OnBeginRequest;
context.EndRequest += OnEndRequest;
}
void OnBeginRequest(object sender, System.EventArgs e) {
if (HttpContext.Current.Request.IsLocal) {
var stopwatch = new Stopwatch();
HttpContext.Current.Items["Stopwatch"] = stopwatch;
stopwatch.Start();
}
}
void OnEndRequest(object sender, System.EventArgs e) {
if (HttpContext.Current.Request.IsLocal) {
Stopwatch stopwatch =
(Stopwatch)HttpContext.Current.Items["Stopwatch"];
stopwatch.Stop();
TimeSpan ts = stopwatch.Elapsed;
string elapsedTime = String.Format("Generated in {0}ms", ts.TotalMilliseconds);
HttpContext.Current.Response.Write("<p>" + elapsedTime + "</p>");
}
}
}
Then add:
<httpModules>>
<add name="TimingModule" type="TimingModule" />
</httpModules>
Each page will have "Generated in (0)ms" at the bottom.
|
|
|
|
|
Hi,
I am developing a database(in SQL SERVER 2005) for a website, as you know that there can be a unknown amount of users surfing a website.
I am putting some registration related values in a table and my table is having a unique primary key with IDENTITY(1,1).
now the problem is I need that primary key value as soon as it is created in the table.
so that I may use that value to add( insert) some other values in other tables.
can it be done?
I have thought of using timestamp values as they are always unique to every row.
I have read somewhere that whenever a query is executed a value is returned such as 1 row affected or something like that,
is it possible to return the timestamp value in place of the above message, I really have no idea.
If it can then may be I can use some query like SELECT id FROM table WHERE timestamp=....;
please reply
YOUR help shall be appreciated
thank YOU
shankbond
|
|
|
|
|
And what does it has to do with ASP.Net?
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
after the Insert query fire
Select scope_identity()
This will return the last inserted identity
|
|
|
|
|
|
If you are executing your INSERT command in a stored procedure, you can assign ID value of the inserted data to a local variable.
Example:
declare @returnID
-- here goes your insert statement
set @return = @@identity
With this you have the value of the ID in the local variable, that you can return o your code as return parameter from the stored procedure.
|
|
|
|
|
I mistakenly posted this thread in asp.net
|
|
|
|
|
|
Hello every one.First of all i am describing my requirment.
Atually in my application i have a treeview controle.TreeView has a Context menu which has option Add item,Delete item,Edit item.When an user select Add New item then there is a window popup.by which user can enter new node.But problem is that i need user selected node for keep as parent node when he click on tree view for add new node as child node.
i am not getting the value of node on which right click and want add new child node.
How can i get it .please help me.
|
|
|
|
|
When u click on left side root u get the Root Node, now select this Root node and then click the "Add Child Node" option.
It solves ur problem
|
|
|
|
|
I am using vs2008, on website tab--> ASP.net configuration in VS.
When i create new website.
Its giving error "An error occur ........", on same page, when i click on link on top right of page "How do i use this tool?", its saying tool has been time out.
But when i open already created website in which i used this tool, its working fine, no error !!
Any help
regards
|
|
|
|
|
Can you please explain "An error occur...."
Without any clue no one can help you.
|
|
|
|
|
anu_anu jee ko pranaam
problem is when i use asp.net configuration tool of VS2008,
file-> new -> Website
It says "An error has encountered, please return to previous page and try again"
But,
File ->open -> website (here if i open already created)
when i click same ASP.net configuration tool, its working fine?
Now any help anu_anu !!
|
|
|
|
|
Hum Dum wrote: How do i use this tool?"
try the following videos
http://www.asp.net/learn/videos/video-47.aspx[^]
http://www.asp.net/learn/security-videos/[^]
Hum Dum wrote: I am using vs2008, on website tab--> ASP.net configuration in VS.
When i create new website.
Its giving error "An error occur ........",
i am not getting what u trying to say May be if u want to use ASP.net configuration in VS. in solution explorer on the top right hand side there is hammer like tool .First try to understand the tool
If It Helps Click It as Answer
|
|
|
|
|
hii can anyone give me idea how to generate the textbox and labels dynamically....
|
|
|
|
|
See this[^]
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
you mean in the client side, or in the server?
if in the client side use :
var elem = document.createElement('input');
elem.type="text";
document.appendChild(elem);
If you mean the server side Textbox use :
create a panel called say pnl
create object of TextBox;
TextBox tb = new TextBox();
pnl.Controls.Add(tb);
Hope you got it.
|
|
|
|
|
mylogics wrote: ow to generate the textbox and labels dynamically.
Manash and Abhishek has already give you the answer.
I just wanted to add one more point that you should now at the time of creating dynamic control.
The control which you are creating, you need to created before Page_Load( ), other wise, it will not able to maintain the View State Data or will not load the Postback Data.
If you deeply look inside ASP.NET Page Life Cycle, Before Page_Load( ), there are two different methods calls. 1) LoadViewState() and 2)LoadPostbackData( ).
So, if you create any control on Page_Load() , or after that it will not able to load the data.
So you need to create such control either in Pre_Init( ) or Init() method.
Though there are workaround to add the Control which are created after page_load into Control Tree for maintaining viewstate and Postback, using Catch up. I am not discussing that over here.
Hope this will help you in longer run
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|