|
Ya It worked For Me.
Response.Redirect ("Default.aspx", false);
Thanks.
|
|
|
|
|
i have a sql query when this run the query then i don't know how expand the time. but i have been return message when query is done. i am using this query on aspx page. when i click the button then this run query. page processing done. query already running.
now my question is that I want when query is done the my page processing is done. e.g both done same time.
how it is possible. please help me.
|
|
|
|
|
What i understand is that you want your query to finish first and then the page is processed. If this is so then on page load call the query synchronously and wait for its completion. And after it is completed proceed to next step. i.e processing of page
Ahsan Ullah
Senior Software Engineer
MCTS 2.0
|
|
|
|
|
Wait for the completion of the query,then start processing the page.
One thing,if your query taking too much time,say more than 2 sec then it is not good and as per best practices so improve the performance of the query
Cheers!!
Brij
|
|
|
|
|
Hi,
I am looking for a Layout option in VS 2008 to absolute the position so that i can move the control anywhere in the form.
Like http://pics.bbzzdd.com/users/clamum/vs2005absoluteposition.gif[^]
In VS 2008 i found this way out
Tools -> Options, and set HTML Designer -> CSS Styling to "Change positioning to absolute...", but in order to drag the element around you have to drag it by the little white tab on top, and not the element itself.
But the above method does not work to drag button, it works only for textbox..
Any clue ?
Thanks
Andy
|
|
|
|
|
I worked on a project this past summer with another programmer who showed me how he created a method in an object that returns a sqldatareader. He had used it in a winform, so we tried it in a web site so we wouldn't have to write the same reader code over and over again. While we were writing the method, we noticed that we couldn't tell the connection to close without an error being thrown. Now, does the sql connection need to stay open while you are reading from the sqldatareader?
|
|
|
|
|
last time i checked it does, you also cannot have more than one SqlDataReader per connection.
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Yes, but can I close the connection before I read the data in the reader? How exactly does the reader work?
|
|
|
|
|
i dont know exactly how the reader works, but you need to close the reader before you close the connection, unless something has changed, i tried that once a long time ago and got an exception and have not tried it since. If ihad to guess i would think that the reader keeps the result set cached on the dbserver somwhere and uses the connection to go get whatever you tell it to go get, i think odbc works ina similar fashion, i could be and probably am wrong about some things but i have not looked into the specifics of how in a while, and when i did it was for .net 1.1 not the newer versions.
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Aptiva Dave wrote: does the sql connection need to stay open while you are reading from the sqldatareader?
Yes.
The data reader doesn't contain the result from the database, it only reads one or a few records at a time.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
you might be using the datareader which fetches the data in loop.
|
|
|
|
|
I'm using a treeview control.
The treeview is on a masterpage, right beside it it has the container.
The user uses the treeview to navigate to aspx pages using this masterpage.
But on each page load the treeview nodes are collapsed to original state.
I want to maintain the nodes expanded state.
How can I do that?
modified on Tuesday, November 11, 2008 1:49 PM
|
|
|
|
|
hi
i think that you configured the TreeView contorl's ViewState property to false.
you can change it to true.
bye.
Mohammad Khansari
|
|
|
|
|
I just want to maintain the treeview depth between requesting pages and not to go back to the expandDepth specified in TreeView property window.
|
|
|
|
|
hi
if you configured treeview's viewstate property to false then treeview state back to it's default through requests.
so you should change the viewstate property to true then you can maintain treeview state through requests.
if you meant anything else tell me my dear.
bye.
Mohammad Khansari
|
|
|
|
|
The TreeView state is True.
but how can I maintain the ExpandDepht?
I want to keep the ExpandDepth not to back to its original state after each request.
Thanks,
|
|
|
|
|
Some pages on my site have sensitive information. If the user is on one of these pages how can I have the page redirect to the login page if there is no interaction on it, say five minutes.
|
|
|
|
|
Take a look at this article.
Regards,
--Perspx
"A refund for defective software might be nice, except it would bankrupt the entire software industry in the first year." -Andrew Tanenbaum
"Einstein argued that there must be simplified explanations of nature, because God is not capricious or arbitrary. No such faith comforts the software engineer." -Fred Brooks
|
|
|
|
|
You can use SesionTimeout but it will be applicable on whole site.just for few pages,you can use a timer to achieve this
Cheers!!
Brij
|
|
|
|
|
When you are login just make the cokie for user and set expiration time of the cookie say five minut and on that sensitive pages u just check the cookie on the page load event if the user came at that page after five minut then the cookie will expire and redirect to login page.
|
|
|
|
|
When a user successfully logs into my website he is sent to the main page. From there if he clicks on the logout link on that page he goes back to the login page. When he is directed back, however, the browser uses the page in the cache. How can I tell it to reload the login page from the server instead?
|
|
|
|
|
This article should help.
Regards,
--Perspx
"A refund for defective software might be nice, except it would bankrupt the entire software industry in the first year." -Andrew Tanenbaum
"Einstein argued that there must be simplified explanations of nature, because God is not capricious or arbitrary. No such faith comforts the software engineer." -Fred Brooks
|
|
|
|
|
when the user click on the logout button then it is redirected to the logout page where in page load event their is the code for delete the cookie and redorect to login page.
|
|
|
|
|
Hi all,
I have one textbox,called Name which is validated for not blank.
Error msg: txtbox not blank.
if click the submit button,the validation applies and eerrror msg. displays --txtbox not blank.
and the cursor is out from the textbox.
my problem is ,after i got the error msg. the cursor will be placed in the textbox name.
i am using
txtname.Focus() but still it is not working.
If txtname.Text.Trim.Equals("") Then
lblError.Text = "Please enter Name."
lblError.Visible = True
txtname.Focus()
Exit Sub
End If
Thanks in advacce
mahaboobs
|
|
|
|
|
...
Blog link to be reinstated at a later date.
|
|
|
|