CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums

MS SQL 2008 on ASP.NET Hosting



Zone: > NEWSGROUP > Asp.Net Forum > visual_studio.visual_studio_2005 Tags:
Item Type: NewsGroup Date Entered: 11/14/2007 8:29:56 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 2 Views: 38 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
3 Items, 1 Pages 1 |< << Go >> >|
ratkinso
Asp.Net User
Check status before loading a page11/14/2007 8:29:56 PM

0/0

Hi all, can someone point me in the right direction to perform a simple task?  On page load I want to check the status of a parameter so that I can run one page if the status of a process is RUNNING and another page if the status is NOT RUNNING.  I have a table that gets the status changed between the two depending on if the process is running or not.  I am not sure how to tell VS to look at that status in the code-behind before it actually runs the page???  Any help is always appreciated.

Thanks,

Randy

bo2bo2
Asp.Net User
Re: Check status before loading a page11/14/2007 8:57:56 PM

0/0

well @ the beginning of your page load function add these lines  

SqlConnection con =new SqlConnection(putYourConnectionStringHere);
SqlCommand com= new SqlCommand ("select status from statusTable where process=" + yourParameterValue.ToString(),con);
con.Open();
bool status = com.executeScalar();
con.Close();

if (status){
   Response.Redirect("running.aspx") ;
}else{
   Response.Redirect("notRunning.aspx") ;
}

  ofcourse this is just pseudo code ... you have to check for real values in ur system also

 

note that the line

   Response.Redirect("running.aspx") ;
will stop execution on the page u r in and display that other page 

If this post was useful to you, please mark it as correct answer. Thank you!


no problem should ever be solved twice
.net wand
ratkinso
Asp.Net User
Re: Check status before loading a page11/15/2007 2:42:06 PM

0/0

Works great, thanks!!!

3 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
DB2 Universal Database V8 for Linux, UNIX, and Windows Database Administration Certification Guide Authors: George Baklarz, Bill Wong, Pages: 912, Published: 2003
ActionScript for Flash MX: The Definitive Guide Authors: Colin Moock, Pages: 1051, Published: 2003
Google Analytics: by Mary E. Tyler and Jerri Ledford Authors: Mary E. Tyler, Jerri L. Ledford, Pages: 316, Published: 2006
The Complete E-Commerce Book: Design, Build & Maintain a Successful Web-based Business Authors: Janice Reynolds, Pages: 374, Published: 2004
Disease Mapping with WinBUGS and MLwiN Authors: Andrew B. Lawson, William J. Browne, Carmen L. Vidal Rodeiro, Pages: 292, Published: 2003
Horse Sense: The Guide to Horse Care in Australia and New Zealand Authors: Peter Huntington, Jane Myers, Liz Owens, Elizabeth Owens, Pages: 356, Published: 2004
Computer Organization and Design: The Hardware/software Interface Authors: David A. Patterson, John L. Hennessy, Peter J. Ashenden, James R. Larus, Pages: 621, Published: 2004
Beginning Google Maps Applications with Rails and Ajax: From Novice to Professional Authors: Andre Lewis, Michael Purvis, Jeffrey Sambells, Cameron Turner, Pages: 365, Published: 2007

Web:
DB2 V9.1 - Administration - Restrict status after LOAD (If you end the COPY job before it is finished, the table space is still in ... LOAD places a table space in the CHECK-pending status if its referential or ...
How to check for user login status before deleting a row in ... What i wanted to do is check the user login status before deleting the row in .... Once the login page redirects the user back to the page, ...
DPS uses driver's licenses to check immigration status | Chronicle ... Oct 8, 2008 ... Texas now requiring proof of legal status before issuing a driver's license .... Loading... Loading Loading... Read all comments () » ...
Problems loading images (more info inside) page status is 'Done ... Problems loading images (more info inside) page status is 'Done' when it's ... quick refresh will load the page as it was before, then load about another 5 ...
Using SAS to Create Teradata Multiload Scripts and Check Load Status Before creating Multiload scripts, it is necessary to document the basic .... After the load, it’s important to check load status so that there is no ...
InformIT: Loading Progress and Status Displays > Displaying a ... To achieve a real page-loading status display, you can arrange for your server- side .... to allow the progress bar graphic to load before the redirection ...
PALS - Instructions Page The e-mail info page is where you can go to check the status of your e-mail ... you load this page it will show you the status of your e-mail verification. ...
Netgear DG834GT status page problems - Networking I have noticed mine struggles to load the status page if i am just starting .... no because i said before i only check the status page when i loose internet ...
MSN Connection Problems - The solution Jul 31, 2008 ... If no problem is detected after check is complete, it can be related ... If the service page does not load and the screen displays “Service ...
System Status page won't load | trixbox I was using 2.6.0.5 before. It was working fine but I switched from a RAID .... Crud, my system status page won't load again. Says it's version 2.6.1.10 at ...

Videos:
Playball-- Is Government Relations More Important than a Child? PLEASE READ CRITICAL AND THEN PLACE THIS VIDEO ON EVERY VIDEO SITE OUT THERE WITHOUT USING YOUTUBE IN CASE THEY REMOVE IT. DOWN LOAD IT AND RE-UPLOAD...
MaskTV Naughty Nurse Knockout Post Fantasy Interview MaskTV Naughty Nurse Knockout Pre Fantasy Interview Real people get their fantasy fulfilled at MaskTV everyday! This is the pre fantasy interview ...
Literate functional testing Google London Test Automation Conference (LTAC) Google Tech Talks September 7th, 2006 Presenters: Robert Chatley and Tom White
Lucky Number Seven 777 פלאי השבע 7 Lucky Number Seven !!! פלאי השבע english subtitle הופעת המספר 7 פעמים כה רבות ביהדות ובבריאה, מעוררת השתאות. מהו סודו של ה-7 ? הכיצד יתכן שהיום השבי...
Charlie Rose - Dennis Ross / Leon Wieseltier / Chris Anderson Segment 1: Dennis Ross, former U.S. Envoy to the Middle East assess opportunities that may arise from the crisis. Segment 2: Leon Wieseltier, liter...
www.moldytoaster.com rchants Oil. Muslim/Jihad Problem Solved erniebane69 (1 month ago) Show Hide Marked as spam -2 Good comment Poor comment Reply Muslims bow on the...
www.moldytoaster.com race the unbelievers and put those who reject Him to shame." Gronamintar (1 month ago) Show Hide Marked as spam +2 Good comment Poor comment Reply ...
www.moldytoaster.com rked as spam +1 Good comment Poor comment Reply I saw that. You are so correct. This video is a copy of " I'am Canadian". It's seems just like a mu...
www.moldytoaster.com ked as spam +2 Good comment Poor comment Reply Early forms of the numerals were developed in India between the 2nd century BC and the 6th century A...
www.moldytoaster.com you can't be a christian without some anal from a 6 year old boy...all this is why your women leave you for us "darkies" so HAHA! Hope ya like the w...




Search This Site:










setup project questions

simple distributed application

how can i get web developer to recognize other databases?

install vs2005

debugger not working

impersonation and internal web server in vs2005 does not work

solution file in solution explorer

slow performance when viewing data or datasets

precompilation and global.asax in visual studio 2005

compress / decompress file with vb.net

create website / open website in visual studio 2005

publishing website

vs2005 and .net 1.1

suggestion with compare validator

how convert vs2005 site web to new web application project

how do i removed unused connections in copy web site?

init() not visible

i can not see the open a new website option or create a new website with visual studio 2005 pro

visual studio .net 2005 team on vista 64-bit ultimate edition

error with replacement of code

can we treat web application as project?

name of code file to deploy website

missing vs 2005 build menu items

publishing to remote or local server has stopped working v2.0

how to get userid of a logined user from aspnetdb.mdf?

templates missing in "add new item" box.

does anyone know this problem

i want to apply a style sheet to a .rdl file

property window always blank in source mode

theming at application level

  Privacy | Contact Us
All Times Are GMT