Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 13th, 2006, 02:57 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default quick questions

hi all.. i cannot find any page that solve this things (that should be very easy for sure!)

1. how can i reload a page that has a control inside?? the control validate the user but the page_load fires before the control and that's make me to force a refresh so the page know that the user is validated...
2. how can i hide a collumn in a datagrid that is bounded to a data reader (the grid has some columns that has to be visible some times and sometimes not, depending on the user)
3. how can i know wich pages call me?? (since i have querystrings in the url, how can i know the last one before the one that call me..)
EX: page1 call page2 and i want to know the exact url of page1

thanks in advance...

HTH

Gonzalo
__________________
HTH

Gonzalo


================================================== =========
Read this if you want to know how to get a correct reply for your question.
(Took that from Doug signature and he Took that from Peter profile)
================================================== =========
My programs achieved a new certification :
WORKS ON MY MACHINE
================================================== =========
I know that CVS was evil, and now i got the
proof.
================================================== =========
 
Old March 13th, 2006, 04:26 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

1. ???
2. DataGrid1.Columns(column index).Visible = False
3. Look into the HTTP_REFERER server variable.

Jim

 
Old March 13th, 2006, 04:26 PM
Authorized User
 
Join Date: Mar 2006
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Default

3.
If you are using IIS server then 'Request.ServerVariables("HTTP_REFERER")' should return the url from which your page is called. If the user is coming to the page by typing the url in address bar it will return a string of length 0. I am in hurry, I will answer the rest later, sorry about it.

Regards,
Sai Puli.


 
Old March 13th, 2006, 04:35 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

thanks guys...

the data grid doesn't have columns members... or at least i cannot find it..

thanks for the 3.. i will try to requery the first one..

i have a page, with severals controls inside. One of them validate the user. When the user insert his data on that control, the secuence when he press the submit button is first the load_page from the main page, then the submit button of the control.. that cause a refresh first in the page, then in the control. i want the other way (or at least first the control!). better now???

thanks in advance again jim and Sai Puli...

HTH

Gonzalo
 
Old March 13th, 2006, 05:40 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

What version of the framework are you using.. I tested the code I gave yoiu, it worked fine.

As for #1, you can't change the way .NET works, when you click a button, it causes a post back.

 
Old March 14th, 2006, 11:31 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

thanks for you reply.. framework 1.1 sp1...

and i know about postback.. maybe im querying wrong :(

HTH

Gonzalo
 
Old March 14th, 2006, 11:52 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

let's see if i can explain better...

my pages has several user controls.. how can i make that the code for the controls fire before the page_load events?? or at least force a refresh on the page?

HTH

Gonzalo
 
Old March 14th, 2006, 12:50 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

What do you mean code run.. do you have validators on the controls?

 
Old March 14th, 2006, 01:01 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

i dont follow you now.. i dont have validators on the control.. it just a login control that put a session variable to true when the user logs, but if the pages show some things only if the user is logged, i have to force refresh the page to see that things.

HTH

Gonzalo
 
Old March 14th, 2006, 02:26 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

Why force a refresh.. If the user is authenticated, set the controls visible property to true or false accordinly.. Also, you said "login control" are you using asp.net 2.0?






Similar Threads
Thread Thread Starter Forum Replies Last Post
i need help quick linkinboy Visual Basic 2005 Basics 11 October 25th, 2007 09:44 PM
Need Quick Help yikomaka Visual C++ 1 September 1st, 2005 05:33 PM
Just a quick one!!!(again) satts Access 11 February 22nd, 2005 06:36 PM
Need quick help please! lryckman Access VBA 2 January 12th, 2004 12:55 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.