|
Hi
I posted this question yday but recieved no solution so I know its a re-post but different day produces different users on the forum and therefore maybe a solution
basically I have some parameters in my aspx page:
<asp:SessionParameter Name="Id" SessionField="id" Type="String" />
Now I would like to put a viewstate value into the session field, I have tried this:
<asp:SessionParameter Name="Id" SessionField="ViewState['id']" Type="String" />
but it doesnt work
is there a way to write the correct syntax to have a viewstate parameter in the above code?
thanks!
We are not a Code Charity
|
|
|
|
|
If I get this right, Session["Id"] would be set to be 'id' ? How ugly. Why would you do this in the aspx ?
I would expect that your best bet if you must do this ugliness, is to set the value in the code behind, using the session object. But then, you're really better off to just do that in the first place, unless you're embedding this in a SqlDataSource or something ( which is just another nasty hack that no professional ASP.NET dev should be using ).
What happens when there's nothing in viewstate ? There won't be the first time this is called, right ? Or, are you setting a viewstate value in code ? If so, why not just use that ? I am missing what the point of this is ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi
OK, my fault I made an error in what I was using viewstate before, turns out I can use a session for it because my query is re-querying on postback so dont need to hold the values.
thanks for the response though
We are not a Code Charity
|
|
|
|
|
iam getting nearly 45000 records from a data base into the asp.net where iam assigning to the grid view .but while getting and binding to the grid it is getting very late how can i solve this problem
|
|
|
|
|
I assume you have paging turned on, but I believe the 45000 records still get stored in viewstate. Your solution is to fix your data layer so it only returns the records you want to display in the current page.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
sir first i have to say thanks for u immediate reply..sir will plz tell
----solution is to fix your data layer so it only returns the records you want to display in the current page. how this can be fixed ?
|
|
|
|
|
Here[^] are a bunch of google hits on how to do paging in your SQL. Basically you want to call a proc that takes a page number and size, and only returns those records. This means you need to handle paging yourself.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
lakshmichawala wrote: getting very late
I guess that means that it is going slow
There is no way to quicken this up as far as I know.
That is a lot of records to display and you are binding them to a datasource at one time so therefore its going to take a long time to bind all those records.
We are not a Code Charity
|
|
|
|
|
hi mr. is there is any other alternative other than binding grid at once
|
|
|
|
|
the way that CG suggested but I think he means that you may have to do the paging yourself rather then using custom gridview paging which would also be a pain.
What you could do is include a search facility for that page to allow the user to search for something and then populate the girdview with the result, this would solve the problem but it is whether you can incoperate it
We are not a Code Charity
|
|
|
|
|
Never try to load that much records. Use filter to search only .
I am working on same thing, and there is more than 3 laks data.. so
use filter .
|
|
|
|
|
hi friend wat does filter means ..?how they can be used.
|
|
|
|
|
I am using FCKEditor for composing mail.
In it i have to insert a image with some text when page is loaded.
Text is displayed prpoerly.
how can i make to image display in FCKEditor.
Can any one help me in this regards
thanks
|
|
|
|
|
Your best bet is the docs for the third party control you're using. Or google. Which is how I found this[^]
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Thanks For replying.
I am not uploading image.
My image is in Fckeditor with some text as page is loaded.
how i will show it.
Text with image in FCKEditor.
Thanks.
|
|
|
|
|
1 read the manual
2 ask in a forum dedicated to the third party control you're using. I've never used this editor, I'm sure many other people here are the same. So, how can we help you ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
|
This is called a pivot table. You could google that, or you could ask in the right forum ( SQL )
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi,
I have posted site on IIS. And handled Application Error in Global.asax
.
If writting http://localhost/testing/ then it will open a default page which is set as Default.aspx
But if writting http://localhost/testing/12112 then it is giving error like 404 Page not found..
So how to handle this errors.. as its not Begin Request so cant figure it out .
Any settings in IIS ?
Thanks,
Sun Rays
To get something you must have to try once.
My Articles
|
|
|
|
|
You can set up your web.config to set what page the user sees if an error occurs.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi,
thanks for your reply.
But I am still getting the same error.
Have done change in web.config.
But no hope..
Thanks,
Sun Rays
To get something you must have to try once.
My Articles
|
|
|
|
|
Perhaps if you post your web config ?
<customErrors defaultRedirect="home.aspx" mode="On">
<error statusCode="404" redirect="home.aspx"/>
</customErrors>
is what I use.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Christian Graus wrote: <customerrors defaultredirect="home.aspx" mode="On">
<error statuscode="404" redirect="home.aspx">
Nope its not working.
If running through IIS, its not working.
Still giving the same error.. Page not found.
After deploy on IIS giving name as "Test",
if writting localhost/Test then its opening default page i.e. Default.aspx
but rather writting localhost/Test if writting localhost/Test/test Then its giving error because there isnt any folder names test.
I want to handle this kind of errors.
Thanks,
Sun Rays
To get something you must have to try once.
My Articles
|
|
|
|
|
There's a custom errors tab in IIS if you right click on the site and choose properties
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi,
have checked Custom Error tab.
but here I must have to choose message type = URL.
and if giving URL = 'D:/IIS/Testing/Error.aspx' then its not taking this URL.
I must have to place Error file in '/iisHelp/common/' folder.
This folder path is 'C:\WINNT\help\iisHelp\common\'.
but cant give aspx page as its giving error bcoz aspx page cant run dependant. So must have to use html page.
any other possibilities ?
Thanks,
Sun Rays
To get something you must have to try once.
My Articles
|
|
|
|