|
You should buy a basic ASP.NET book and work through it, because you seem very confused.
You write a template for the link in the gridview that includes the url, exactly as you're showing it, except it needs a value - deteles.aspx?Id_no=3 for example. Then you use Request.QueryString to read the value on the other page.
This is 101 stuff. I assume this is not a commercial project, but one for learning. Apart from anything else ( such as your lack of experience ), your client won't be happy to get a page with a link that says 'show deteles'......
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
|
U Can Used This
Response.Redirect(string.Format("default.aspx?Page=Resern&navigation=view&ReservationID={0}&SegmentID={1}&stat
us={2}", reserID, segID,status), true);
if it is Integer format u need to use {o}
reserID,segID,status is integer
if it helps Mark It As Answer
|
|
|
|
|
Response.Redirect(string.Format("default.aspx?Page=Resern&navigation=view&ReservationID={0}&SegmentID={1}&status={2}", reserID, segID,status), true);
what is this what are this thing "reserID, segID,status"???
i only want to Pass The ID_no from the data gridview in the first page "Defult.aspx"
((this will happen when i Click on the Hyperlink "Show detels" in the gride view ))
after clicking on the linke it shuold pass the id to the secound page "Deteles.aspx" that is all what i want.
my god those guys are genus and i can't do this thing !!!!
thank you sir.
al hajjaj
|
|
|
|
|
write this code in response page
"Response.Redirect(string.Format(default.aspx?id={0}",id), true);
Write this code in secound page
string id=Request.QueryString["id"];
u will get the id in string format
otherwise store it in session
If It Helps Click It as Answer
|
|
|
|
|
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 !!
|
|
|
|