|
That is not the code that you are running. It won't even compile.
Please show the real code. I don't want to look for errors in code that isn't even used.
---
single minded; short sighted; long gone;
|
|
|
|
|
Forget the code for a moment, can you plz tell how to save all the details of a listbox(details such as the currently selected index), say list1, in a place so that when a postback occurs i can reload the listbox list1, with the saved values.
the code compiles properly, but when a post back occurs, an obvoius error pops up, because of the fact that i only populate the listboxes on first load.
i suspect the error must be either in the load event or the click event thats why i posted em.
why do u say that this code wont compile?
plz help me out!
-venkat
|
|
|
|
|
You can only load the data on first load, precisely because if you reload it, you throw away your viewstate info, including the selected item. You get all this info for free, so long as you've not turned off viewstate. If you have, then you won't get it, and you won't have it to save anywhere else, either.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
dravidan wrote: why do u say that this code wont compile?
I presume he copied it into an empty project and attempted to compile it. Either that or he was astute enough to spot a compiler error by looking at the code posted.
|
|
|
|
|
dravidan wrote: Forget the code for a moment, can you plz tell how to save all the details of a listbox(details such as the currently selected index), say list1, in a place so that when a postback occurs i can reload the listbox list1, with the saved values.
Unless you turned off viewstate, the listbox will take care of that itself.
the code compiles properly
Then you should post that code.
dravidan wrote: i suspect the error must be either in the load event or the click event thats why i posted em.
Eh... no, you didn't. At least not the same version as you were using.
dravidan wrote: why do u say that this code wont compile?
Because it won't.
Look at the first line in the submit_Click method. Can you see why that won't compile?
---
single minded; short sighted; long gone;
|
|
|
|
|
please tell me how can i unzip the zip files ...
Feoze
|
|
|
|
|
Please don't cross post.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
i set the maxRequestLength property in web.config to recieve files larger than 4 MB but when i upoload online, after some time page timeout messages display.... help me please.....
Feroze
|
|
|
|
|
You already have a thread about this. There is no need to start another thread about the same thing the same day.
---
single minded; short sighted; long gone;
|
|
|
|
|
I have datagrid on asp.net page.On page load the page fetch data from mssql database and bind it to the datagrid. There is one unusual problem.ie, "undefined" is displayed on all the rows and columns of the datagrid occassionally.
Please give me some hint to solve this panic problem.
Thanks for your valualbe information.
tprkash
|
|
|
|
|
Hi,
Does this "undefined" displayed on post back ?
"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
coolestCoder
|
|
|
|
|
Yeah."undefined" is displayed on post back.
tprakash
|
|
|
|
|
Hello,
I have a string that holds a number (sum of money).
To format the string as a currency I us:
string.format("{0:$#,##0.00}",Convert.ToDecimal(myObj.tostring()));
The problem is that if the number is negitive it saw as:
10,123- (the minus is from the right)
and I like it to be:
-10,123 (the minus from the left of the number).
How can I format it like this?
Thanks.
|
|
|
|
|
Are you saying that if it goes in as -10123 it comes out as 10,123-?
Is you culture setting affecting the placement possibly? I just tried this with VB.NET and it returns -$10,123.00.
If you have to just rework it then do a simple replace like this:
If strTest.IndexOf("-") = strTest.Length - 1 Then<br />
txtTest.Text = strTest.Replace(strTest, "-" & strTest.Remove(strTest.Length - 1, 1))<br />
End If
Cleako
|
|
|
|
|
When I restart the IIS for sometime I notice the following error when i try to access the web applications deployed on the IIS.
Error message from the Event Viewer:
The description for Event ID ( 1003 ) in Source ( ASP.NET 1.1.4322.0 ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. The following information is part of the event: 6092, 180.
Problem magically disappear after 15-20 mins and things work just fine. It looks like IIS can catch hold of ASP.NET framework for 15-20 after restart.
Can someone help please?
I want solve this stupid problem.
Global warming
|
|
|
|
|
Hello,
I'm a newbie trying to insert a quick-and-dirty Javascript email form in an .aspx page. For some reason, trying to execute the form returns a "Object reference not set to an instance of an object" error. Will the Javascript only work in a regular .html page, or can ASP.NET controls and Javascript play well together?
Any help or advice would be much appreciated. For reference, the javascript inserted is:
Header:
<[CODE]script name="JavaScript">
[/CODE]
Body:
[CODE]
Name | | E-mail | | Your message:
|
[/CODE]
|
|
|
|
|
The script is trying to set the location of the parent window. Does the window have a parent window?
After setting the location, the form will also be posted to the server. Is this intentional?
---
single minded; short sighted; long gone;
|
|
|
|
|
Thanks very much for replying.
I grabbed that code off of some site online; I have no idea why it was trying to do that. I read more about Javascript, and then realized it was sort of insane to use it on a .NET site when returning forms was one of the functions ASP.NET was made for in the first place...
Thanks again!
|
|
|
|
|
I have an application which gives me this error the first time it's accessed after a while:
"Session state has created a session id, but cannot save it because the response was already flushed by the application."
And, of course, when I refresh the page, or move to another, the error does not appear anymore because, the session is saved without trouble during subsequent requests.
I read somewhere about Response.Flush() causing this problem, and also that app.pool recycling could be the reason for seeing this error, but I didn't use Response.Flush anywhere. I suspect I probably did something bad in my code or at a bad time, but I'm also thinking it might have something to do with web.config.
I've searched a lot, and could find an answer.
Dragoljub Ćurčić
----
Imagine what you'll know tomorrow.
(Men in black)
|
|
|
|
|
The session id is stored in a cookie, so what the error message really means is that it's the http head part of the response that has already been flushed. Normally this doesn't happen until the page is complete, but if you turn of response buffering, this may happen earlier.
---
single minded; short sighted; long gone;
|
|
|
|
|
Thanks for the reply.
I really did put buffer="false" in web.config (<pages> element). I'll try removing that attribute.
Dragoljub Ćurčić
----
Imagine what you'll know tomorrow.(Men in black)
|
|
|
|
|
Hi,
I am storing some variables in Session -- which is stored in sql server 2005 DB . Everything is set up for database and i can aslo tables(ASPstateTempSessions & AspStateTempApplications) for session in the ASPStateDB.
But i am not able to see the session variables stored in the ASPStateDB tables. All i see is SessionId and some other fields but not my variables and its values.
EX. Session["myVariable"] = data;
I cannot see myVariable and data being stored in the database. Arent they supposed to be there?
However if i use trace i can see all the session variables and their values.
Any help is appreciated,
Yojimbo
|
|
|
|
|
Dear All
I have developed a web application that connects to oracle database on the server "on the network"
All is working fine from my computer and all the team computers
i tried to install the application on the client's pc but i get the error "Unterminated string constant" like a javascript error when the page loads and the data is not filled in the form
i debugged it and it said it needs oracle client components "network..."
all is set up! it's the same like my pc but it doesn't work!
i formatted the pc and reinstalled .net framework, sql server, and oracle client 9i and the same problem is still happening
I donno what to do and i have limited time to finish so i would appreciate any quick response
Thanx
Best Regards
3ala2
|
|
|
|
|
You formatted a clients PC because you couldn't figure out how to get the config right ?
If it's a javascript error, you'll be given a line number, and viewing the source will give you a much better idea of what is going wrong.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
actually i am develpoing a site please tell me How can i provide the facility to upload 5-10 mb files using ASP.NET 2.0 and VB.NET please help me yaaaar....
Feroze
|
|
|
|