|
Yes. I was doing outside the events.
Thank you for your reply and your time.
If I asked later, I would save some time figuring out what went wrong .
And thank you Navaneeth for a tip about casting.
Best regards and thanks both of you.
|
|
|
|
|
Venkatesh is correct. Also when you do type casting you can use as keyword which is much faster than this type of casts.
Kasic Slobodan wrote: (UserInfo)Session["UserInfo"];
So this can be written like UserInfo user = Session["UserInfo"] as UserInfo;
|
|
|
|
|
I'm making a ASP.NET 2.0 program. I need to display page information to new windows. This is my code.
string cPSCRIP = "" +
"window.open('test.aspx','test',"+
"'width=auto,height=auto,toolbar=no,menubar=no,"+
"scrollbar=yes,resizable=yes')" +
"";
ClientScript.RegisterStartupScript(typeof(Page),"Testscript",cPSCRIP);
At MS WindowXP with IE7, this works. However, at MS Vista with IE7, this code is not working. It only show 'done, but there is error on page' message at statusbar. How can I solve this problem? Can anyone help me?
PS) MS Vista with IE7 -> protected mode:on
|
|
|
|
|
And what does the error message say?
only two letters away from being an asset
|
|
|
|
|
no error message. At MS Vista, it just not show a new IE windows.
|
|
|
|
|
Dong Kim wrote: It only show 'done, but there is error on page' message at statusbar
Double click the icon and show what the error is
only two letters away from being an asset
|
|
|
|
|
Hi All,
I a page in ASP.net i want this page to run every two hours with out any manual intervation.
How could i do it please?
Inshort,i want the application to execute itself every two hours.
Thank you.
|
|
|
|
|
Have you considered that this is not what ASP.NET is used for? There are other, much more appropriate ways to achieve this such as sheduled tasks, or windows services.
|
|
|
|
|
Thank you very much for your response.
How will i setup the following URL to run every 2 hour.
http://localhost:1257/Update_Table/Default.aspx
Thank you
kibrom
|
|
|
|
|
You thanked me for my response, but did you actually read it?
|
|
|
|
|
whats wrong with you man!Can you please be Polite.
Take it easy.
|
|
|
|
|
He is in fact polite, calm and poised and he has helped out in great depth. You ought to first read his full suggestion before embarking on your journey of throwing a counter-thread for clarification.
Coming to your question, you can actually have a simple VBScript (VBS) file to use XmlHttp to hit the URL and get the response. You can have this VBS file scheduled to execute from your Windows Scheduled Tasks.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
Well, actually I do understand the need for this kind of automation. Using ASP.NET to automize things can be very handy, when running the asp.net app on a shared webspace...much cheaper than buying dedicated servers. If using dedicated servers I agree, a windows service would do better.
|
|
|
|
|
|
As one of the messages on that article states..."what a mess".
There is no way that using the Cache is a good way to schedule tasks, mostly because you cannot guarantee that the cached item will not be removed before you ask it to (ie, in low memory conditions). You end up having to bolt workaround after workaround on top of this olution to handle early expiration of cache items.
Do yourself a favour and write a VBS and use windows scheduler as someone suggested above.
|
|
|
|
|
Hi,
I have a gridview control and a radiobuttonlist with 4 options. Each option applies a different Rowfilter (one of them is "All data") to the dataset.Tables[0].DefaultView Rowfilter and then the grid is bound to the filtered dataview. On the localhost the app run 100%, as soon as I publish the app I get a "Internet Explorer cannot display the webpage" error on the radiobuttonlist_selectedindexchanged event. The dataset returned from the sql db can be very large 10000+ records (even after I added a number of parameters to reduce the result, I cannot apply more paramaters therefore I'll have to get a way to display and filter that amount of data)
Any help would be much appreciated.
Thanx
|
|
|
|
|
You are trying to display 10,000+ records all at once?
Have you thought about Paging?
only two letters away from being an asset
|
|
|
|
|
Yeas, I do use paging: pagesize: 20. At first I read all data in at once saved it in session and the rebind on pageindexchanging to the session object. I got the same error. Then I changed the code to alter the sqlcommand on the rbl_selectedindexchanging event and read only the data from the database for the selected error. Then on pageindexchanging the sql command is executed again. Still the same error.
|
|
|
|
|
Hi! I'm doing a project where I need to generate at run time new View controls inside a MultiView control. The Views generated are based on data pulled from an Xml file, so it must be done at runtime. Additionally I have a command button for each View - when I click on the first button, the first view should show...
So far I have written the code to generate these at runtime (the code is in a Page_Load event), and the first button I click on shows the correct View with no problem. However when I click a second button I get the following error message:
"
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentOutOfRangeException: ActiveViewIndex is being set to '0'. It must be smaller than the current number of View controls '0'. For dynamically added views, make sure they are added before or in Page_PreInit event.
Parameter name: value "
I understand that this is saying that my code to generate views should not be in Page_Load, but should instead be in Page_PreInit, and when I have run tests moving the code It has worked with no problem.
HOWEVER..... I have the constraint that I am trying to do all of this inside a Web User Control, which does not have a Page_PreInit event (this is so that I can use the component in a DNN module later)
Does anybody know of a work around for this?
Thanks in advance,
Chris
modified on Thursday, February 21, 2008 10:51 AM
|
|
|
|
|
c2423 wrote: I have the constraint that I am trying to do all of this inside a Web User Control
Are you talking about Custom Web Control? Override any of Render methods which is available with all controls.
|
|
|
|
|
No, I'm talking about a Web User Control
The difference being that I'm using the one where you click and drag controls around, like a normal Web Form/Windows Form, rather then the one where you write the rendering code
I dont see quite how overriding the render method will help?
Thanks,
Chris
|
|
|
|
|
I have a button in my web page , on clicking that button , a pop up window appears , the pop up form has a gridview(has two columns , name and check box column) , after selecting certain records in the gridview , i click the button in the same window which save the selected records in the temporary table and finally in the session and last the pop up window gets closed.
now my problem is , how should i populate those selected rerords of pop up window , in the parent web form , right after closing the pop up window.
Yesterday is a canceled check. Tomorrow is a promissory note. Today is the ready cash. USE IT.
|
|
|
|
|
If you're storing the data to the database in the popup, the options are a refresh, or AJAX.
Christian Graus - Microsoft MVP - C++
"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 3 tables.and i write some data for example.
1. tAssetMaster------AssetCode -PK ,Descriptionlong etc.
1 Nagarjun Fertil
2 Tata motors
2. tSectorMaster-----SectorCode - PK,Description etc
1 Auto
2 Aggriculture
3.tAssetSectorMap----AssetSectorCode-PK, AssetCode , SectorCode etc
1 1 2
2 2 1
i want datarelation between these three tabels.
pls help me
gayatri
Gayatri
|
|
|
|
|
Ask your professor
only two letters away from being an asset
|
|
|
|