|
hello
like i have one aspx/asp page which iam using in my many anither pages so i don't want to write all the stuff every time how can i do this?
i tried with
its not working
and i also tried with
response.writefile("file.aspx")
its working but i want to use some functions of file.aspx page in my present page -----------its throwing an error there because it adds the file at run time and the function in it has not declared before
so how can i do this
can any one suggest me ------------
|
|
|
|
|
Hi,
I think you must use ASP.NET User Controls (*.ascx)
|
|
|
|
|
hello
like i have one aspx/asp page which iam using in my many anither pages so i don't want to write all the stuff every time how can i do this?
i tried with
its not working
and i also tried with
response.writefile("file.aspx")
its working but i want to use some functions of file.aspx page in my present page
|
|
|
|
|
You have to create user controls for that purpose. They are just like your aspx pages and you can drag and drop to any page you want. The extension for that is ascx.
Best Regards,
Apurva Kaushal
|
|
|
|
|
but i have "response.write" stmts in my page how can it work
any other way?
can any one send me one example?
|
|
|
|
|
It does not matter. What you need to do is first create a ascx page(User control). Same as you create a aspx page and then drag it from solution explorer to you web page(aspx page) and that over. You can get the contents of the control to the page.
Best Regards,
Apurva Kaushal
|
|
|
|
|
thanks alot for a very fsater reply
but still iam getting prob because i have some functions in my first page which are having response.write stmts ok and i want to use these functions in my second page.........iam getting reference error
thanks in advance
|
|
|
|
|
I am not been able to understand your because i dont think there is any relation between your user control and response.write statements. What is the exact error message and you debug the code and see where which part is diaplaying the error.
Best Regards,
Apurva Kaushal
|
|
|
|
|
hai apurva
let me explain what i need exactly
ihave one.aspx page ok in that i have written some functions to display some table of content ok
for example...
in my one.aspx ihave a function like...
function disp(pagesize,query...etc)
(iused record set of adodb here to fech the table from param query passed ok)
response.write("")
(taken loop to display)
response.write(")
and so on.
now i want to use this function in my second.aspx
i think now it is clear
thanksrecods that feched from table |
|
|
|
|
|
If you just want to use that function in multiple pages then what you can so is place that function in a class file and then call it from the pages where ever you want.
Best Regards,
Apurva Kaushal
|
|
|
|
|
Can I implement lostfocus, gotfocus and keypress events in ASP.Net as in VB6.0
Nandini Sharma
|
|
|
|
|
Those events occur in the browser, so you use client script, i.e. Javascript, to handle them. They are named onfocus, onblur and onkeypress.
---
b { font-weight: normal; }
|
|
|
|
|
hi dear
i am trying to calculate the total amount of memory and cpu used while using string and stringbuilder.
i am trying this way ...
calling a method in one button click and writin to response.
Process myprocess=Process.GetCurrentProcess();
string str=null;
for (int i=0;i<=10000;i++)
{
str+="Hello1";
str+="Hello2";
}
Response.Write("using string : "+myprocess.WorkingSet.ToString()+" ");
and calling another method on another button click and writing to response.
Process myprocess=Process.GetCurrentProcess();
StringBuilder str=new StringBuilder();
for (int i=0;i<=10000;i++)
{
str.Append("Hello1");
str.Append("Hello2");
}
Response.Write("using stringbuilder : "+myprocess.WorkingSet.ToString()+" ");
but i am not getting the appropriate answer as it is showing the stringuilder is using much memory then string...
i have calculated the total time using two date time variables initialising them before starting and end of loop and then subtracting and getting the milliseconds of difference in between them. one more thing that i am calling both the functions after restarting the page.
please help out me guys, i need the solution of this problem very urgently!!!!!!!!!!!!!!!!!!!!!!!!1
regards
vishal sharma
Thanks & Regards
Vishal Sharma
vishalsharma556@yahoo.co.in
|
|
|
|
|
Don't do this:
Process myprocess = Process.GetCurrentProcess();
Just replace all of the myprocess lines with Process.GetCurrentProcess() . The data in myprocess doesn't change.
|
|
|
|
|
Hi,
we use PostBackUrl passing values of controls from one page to anther page in encrypted way(FORM)
can i use same method to pass the values of variable in code Behind of page 1 to code Behind of page 2?
any one explain
thanks a lot....
|
|
|
|
|
In your second page, look at using PreviousPage.FindControl() passing it the control ID of the control you want the data from in the first page. You'll have to typecast it to the proper control type to get the data, but this does work. I don't believe that this encrypts the data, but it is not visible in the URL.
-Matt
------------------------------------------
The 3 great virtues of a programmer:
Laziness, Impatience, and Hubris.
--Larry Wall
|
|
|
|
|
This is good
But I mean how I can pass the values of variable in code behind of page 1 to page 2
thanks
|
|
|
|
|
If all you want is to pass the value of a variable, just use your Session object:
Session["variable_name"] = myVariable;
And then in your second page
string myVariable = Session["variable_name"].ToString();
If this is not feasible because you don't want to use cookies (which Session uses by default), there is a way to enable cookieless sessions.
-Matt
------------------------------------------
The 3 great virtues of a programmer:
Laziness, Impatience, and Hubris.
--Larry Wall
|
|
|
|
|
sir,
What's the difference between session.clear and session.abandon ?
Thanks.
|
|
|
|
|
Session.Clear stays in the same session.
Session.Abandon dumps the current session and starts a new session.
Sincerely,
Elina
Life is great!!!
Enjoy every moment of it!
|
|
|
|
|
Hope u r all fine
I have a problem concerning sorting in a datagrid.
I have a bound column that gets its value from 2 database fields -FirstName & LastName-
When I write in the sort expression of that column "FirstName" it sorts properly but when I write "FirstName,LastName" it doesn't sort..
So how can I sort using these 2 columns together??
Thanks a lot in advance
|
|
|
|
|
You cant sort the data in the database with two columns. Alternatively what you can do is make the combination of the two columns and then in sort it there in temporary sorage such as dataset.
Best Regards,
Apurva Kaushal
|
|
|
|
|
try to use dataview for sorting...
Thanks & Regards
Vishal Sharma
vishalsharma556@yahoo.co.in
|
|
|
|
|
<advertisements>
<ad>
<imageurl>915a.swf
<navigateurl>http://www.mashhad915.com
<alternatetext>mobile
<keyword>A
<impressions>Technology
This is the caption for Ad#1
<ad>
<imageurl>mahak.swf
<navigateurl>http://www.mashhad915.com
<alternatetext>mobile
<keyword>A
<impressions>Technology
This is the caption for Ad#1
|
|
|
|
|
Anyone knows how to add the thousand (comma) separator to bound columns that contain numbers in a GridView control?
Mohamed El Gohary
|
|
|
|