|
do some modification in web.config file..
i.e change debug = true like below tag.
<compilation debug="true">
suchitamanandhar@hotmail.com
|
|
|
|
|
i need to display a timer for the elapsed time in aspx
or if I can use any property that shows if the user has been idle for 30 mins to ask him if he wants to continue or to log out.
BiG RaLpH
|
|
|
|
|
You can set a timer in javascript. That's the only way to do anything dynamic in a web page, as that's all that runs on the client.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
ok how can i display it in a label control?
BiG RaLpH
|
|
|
|
|
You'd probably just use a div or somethng, so it's not messy. Use document.getElementById to find your div, and set it's text. This all happens in javascript.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi all,
I need to assign javascript varaible to codebehind variable on before window.location.reload.
Is there any way???
Thanks in advance...
|
|
|
|
|
Depends, in what directon ? You can write the value in your codebehind, so that it's passed to javascript as a variable definition. To go in the opposite direction, you should put a hidden field on your page, set it's value in javascript, and grab it out of your code behind. But, again, no postback occurs if you call window.location.reload. Two people have explained this to you already. There is no postback, and so any javascript values are lost.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Thank you sir, but I know they have explained me but its not working. Here is the javascript function:
function ActiveTabChanged(sender, e)
{
var mytool_array=sender.get_activeTab().get_id().split("_");
document.getElementById("<%=htxtQueryStringValues.ClientID%>").value = "fromtab=true&tab=" +mytool_array[4] +"&sheet=" +sender.get_activeTab().get_headerText() ;
alert(document.getElementById("<%=htxtQueryStringValues.ClientID%>").value);
window.location.reload();
}
And on Page Load I get the value of hidden textbox values as blank....
Please tell me Is there anything I am doing wrong in above code???
|
|
|
|
|
I'm not sure how many attempts it will take before you actually understand what you've been told over and over.
ASP.NET 2.0 wrote: window.location.reload();
This does NOT do a postback. Therefore all your javascript values are lost. The page lifecycle restarts as if the last request occurs. A postback does not occur. A postback does not occur. A postback does NOT occur.
So, as you've been told, you need to initiate a postback, which you can do by calling click on a button which posts back, or by working out the javascrpt method to call directly.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
May i know what is the difference between State server and SQL server modes
and also about Inproc? In which scenarios they are used?
Tell me in which scenarios they are used?
Thanks in advance,
pavan...
|
|
|
|
|
pavanteja wrote: Inproc
Stores in the memory. If no session mode is specified, this will be default
pavanteja wrote: State server
Stores session state in another process called ASP.NET state service. Ensure the session availability after restarting the webapplication.
pavanteja wrote: SQL server modes
Stores in SQL Server database.
Check this[^] article to get an idea about how to choose the best method
|
|
|
|
|
that is ok with me........But may i know what is difference between state server and SQL server.........In wat cases they use......I mean the need?
pavan...
|
|
|
|
|
Please go through the link I have given. It explains that in last section
|
|
|
|
|
sorry.....I dont find any link in ur reply...........
pavan...
|
|
|
|
|
|
Hi,
I am Using a List<city> to store the data retrived from database...
My code goes as this
Service Layer Method:
public List<city> GetCities()
{
DataSet ds= cdb.GetCities();
List<city> city = new List<city>();
foreach (DataRow row in ds.Tables[0].Rows)
{
city.Add(new City(row["city_id"].ToString(), row["city_name"].ToString(), row["state_id"].ToString(), row["city_classification_id"].ToString()));
}
return city;
}
In Application Layer: I am Caliing the method as below
GridView1.DataSource = cs.GetCities();
GridView1.DataBind();
It works fine but ....
The Columns are not coming in the same order as in Database i.e... CityID, CityName, StateID, cityClassificationID.
The column order comes in as cityClassificationID,CityId, CityName, StateID.
But I want them in the same Order i.e CityID, CityName, StateID, CityClassificationID...
How to accomplish this....
Sangram
(A battle with self)
Life is simple, we are the ones makes the living difficult
|
|
|
|
|
Turn off auto columns and define them yourself in the order you want.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Strange, Why don't you return the DataTable object from dataset ? Any way you are iterating through all rows, or is there any other reason that you are specific with List ?
|
|
|
|
|
There is a school of thought that suggests the data layer should return collections of objects instead of database related classes.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Christian Graus wrote: There is a school of thought that suggests the data layer should return collections of objects instead of database related classes.
Great information. I was not knowing.
What will be the impact when it returns Database classes ? upto my knowledge, DataTable is also a collection class which contain a collection of DataRows. So what is making difference ?
|
|
|
|
|
He's returning a collection of entity objects. It's at least partially a religious discussion. I've seen all sorts of other OO principles thrown out in order to pursue this one goal. It's not clear cut, and you need to make a call based on the needs of your project.
It is very sexy to call the data layer and get back a list of custom business objects, tho.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi friends
In my asp.net form, I want receive an image from network and show it. The image has jpeg format and is sent in Byte[] format. When I receive it, how can I display the image? pleas write the code.
thanks
|
|
|
|
|
your server needs to recieve the image, and either save it to the hard drive, or your page will need to show the image and nothing else, then you can do a binary write
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Thanks so much , but can you tell me how binary write works for display image?
|
|
|
|
|
82130012 wrote: but can you tell me how binary write works for display image?
Binary write to the Response. Set the Response content type to image.
|
|
|
|