Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need to send drop down box value/text to another page

Status
Not open for further replies.

veronic

Programmer
Apr 6, 2004
73
0
0
US
I have a grid with populated summary data which depends on drop down selection by departments.
One column in this grid is hyperlink which send three different parameters to detail screen. I am using URL on the HTML side: NavigateUrl='<%# DataBinder.Eval(Container, "DataItem.STATUS_DESC", "../reports/rp_balancesum_det.aspx?stStat="+DataBinder.Eval(Container.DataItem, "STATUS_CODE </asp:HyperLink>

and I get it in next page like:
strStatus = Request.QueryString("stStat")
strAudit = Request.QueryString("stAud")

I need to be able to send drop down value or text to detail screen too and this value is not a part of my dataset.
I cannot use Response.redirect....
How can I do this programatically?
 
thats exactly what ClientID does. and yes you HAVE to register it.

that was just to give the user an idea of what was happening. read my post above. i mention that IT IS possible to register JS using code behind.
OK, so provide the method of how it is done server-side so that the poster can research it rather than provide an example using an outdated technique.

that is really an old arguement. if JS was disabled then a LOT of ASP.NET features wont work. I think this comment is out of context in this post because this applies to ASP.NET as a WHOLE.
It's an old argument because people don't understand the need to support those users. Just because some ASP.NET controls are built to use javascript by default, doesn't meant that you have to sit back and take it. You can and should create sites that use javascript to enhance the usabilty of the site for users who do have javascript, but the functionality shouldn't rely on javascript.

sure, that that man, that that idea. The entire idea of using JS is to minimise the load on the server however small it is!!!
I'm not sure what the first part of your statement means but the second part should only be used in context. For example, you can minimise the load on the server by implmenting client-side checks so that the form is posted back needlessly, but the checks should still be done server side for those users without JS (or even hackers who can easily bypass js). Simply using JS wherever possible in place of proper server-side functionality is quite simply asking for trouble.

The main point of this is that JS shouldn't be relied on for functionality of your site and I think most professional web designers will agree with me on this.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
>>OK, so provide the method of how it is done server-side so that the poster can research it rather than provide an example using an outdated technique

i STILL dont consider this a completely outdated technique (of using <%%> tags in ASP.NET). so as far as my solutions go they, i will always include them wherever i feel its OK.

I have NEVER faced any issues because of the same.


>>Just because some ASP.NET controls are built to use javascript by default, doesn't meant that you have to sit back and take it

Many of those are VERY important features (Like AutoPostBack, AJAX), so its usability Vs Coding. here again it calls for judgement.


>>The main point of this is that JS shouldn't be relied on for functionality of your site and I think most professional web designers will agree with me on this.

this statement is too general in nature.

are you telling me that for every bit of JS that you write (lets say to make some layers visible invisible, this can ALSO be done server side dusing panels) you write an ASP.NET code?

and again are you telling me that you have NEVER used JavaScript the way I have used in this example (Not the way it is written but the concept of using OnclientClick or adding Attributes at run time to links)?

again there is a call for a judgment here.

if you had said the same in the context of a validator control i would have accepted the same as there is a security issue there.

But in the case of this post it is being blown out of proportion unnecessarily! in my opinion a simple script would do.


and finally:
>>that that man, that that idea

means that each person has an induvidual outlook on things...


Known is handfull, Unknown is worldfull
 
i STILL dont consider this a completely outdated technique (of using <%%> tags in ASP.NET). so as far as my solutions go they, i will always include them wherever i feel its OK.

I have NEVER faced any issues because of the same.
Maybe you don't consider it outdated, but Microsoft do and ASP.NET is designed to split functionality and design into different parts (i.e so that code is seperated from HTML so you could, if needed, have the designers and programmers working on the same page at the same time). You probably won't have many issues (and by that I mean errors) with this method as ASP.NET is designed to be backwards compatible to the classic ASP method of coding. It doesn't mean we should use it though and we should try to move with the times and the technology.

Many of those are VERY important features (Like AutoPostBack, AJAX), so its usability Vs Coding. here again it calls for judgement.
I agree entirely but what I'm saying is that they shouldn't be relied on. There should be a method in place so that all users can functionally use the site, but these methods should be used to imporve (if possible) their experience.

this statement is too general in nature.

are you telling me that for every bit of JS that you write (lets say to make some layers visible invisible, this can ALSO be done server side dusing panels) you write an ASP.NET code?
I'm saying I provide a method so that all users will be able to see the information they need to. Using your example of a layer, then yes I would provide a way for this layer to be shown if the user didn't have javascript. Why punish them because they don't have it or don't want to use it?

and again are you telling me that you have NEVER used JavaScript the way I have used in this example (Not the way it is written but the concept of using OnclientClick or adding Attributes at run time to links)?


But in the case of this post it is being blown out of proportion unnecessarily! in my opinion a simple script would do.
My method isn't any more complex and it doesn't suffer from any potential issues regardless of how the client is viewing the page.

means that each person has an induvidual outlook on things...
OK, I see.



____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
OK

i have 2 more things to note here

>>You probably won't have many issues
What other issues are you expecting other than:
a. Coding
b. Errors
in the old method?
as for the concurrent working, hmm maybe i becaused i have not come across such a problem its like that.

>>ASP.NET is designed to be backwards compatible to the classic ASP method of coding. It doesn't mean we should use it though and we should try to move with the times and the technology

Then why are they including this in ASP.NET 2 also why not remove this feature at all? because as per your logic no one should use the ASP method in ASP.NET. so why include?

again i think you are speaking from a principal point of view (OOPS concept).

Generally speaking i DO break away from certain concepts if it gives me the following:
1. Lesser code and better readability (I think the <script> is much more readable than including the same in a line in codebehind).
2. No loss on security aspects.

I have never found a problem in this approach.

thats why i mentioned that this is an outlook...

Known is handfull, Unknown is worldfull
 
What other issues are you expecting other than:
a. Coding
b. Errors
in the old method?
as for the concurrent working, hmm maybe i becaused i have not come across such a problem its like that.
Issues could be something as simple as debugging. Generally, having functionality is one seperated place makes it easier to debug, rather than having to look at the code behind and aspx page.

Then why are they including this in ASP.NET 2 also why not remove this feature at all? because as per your logic no one should use the ASP method in ASP.NET. so why include?
Because it is still designed to be backward compatible. As I don't work directly for Microsoft, I can't say what reasons they have for including any methods, but my guess would be that they don't want to alienate classic ASP coders and want to make the transition to ASP.NET as easy as possible for them.

again i think you are speaking from a principal point of view (OOPS concept).
Yes, I'm definately coming from an OO point of view as I think we should be taking advantage of these features as much as possible.

I have never found a problem in this approach.
So, have you ever:

1) Used a PC's browser with JS turned off
2) Used a handheld deive that doesn't support JS
3) Though about the problem from an accessibility point of view (i.e. those users who can't use regular browsers (visual or other impairments)

I've used, and still do, items 1 & 2 and know people who fall into item 3 and as such I try to cater for, not alientate, these scenarios.

thats why i mentioned that this is an outlook...
I'm not denying that your solution will work, or that it's easy to implement as I know it is a viable option - I just think that there is a better method that caters for more users and scenarios and doesn't have as big a drawback. Whether anyone chooses to listen or take that advice is entirely up to them.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
I am working on java script, but it goes very slow (I don't know java script at all)
 
So, have you ever:
1) Used a PC's browser with JS turned off

Yup, we do that to test the security of the site. In this case the above script WILL FAIL, but we make i mandatory for users to hava javascript enabled.

Again it depends on the user base. My user base always supports JavaScript, we make it clear before taking up the project.


2) Used a handheld deive that doesn't support JS

Nope, so i cant comment on this point.

3) Though about the problem from an accessibility point of view (i.e. those users who can't use regular browsers (visual or other impairments)

I have worked on one such project (Where the user uses an IE browser with the reader tool). And YES JavaScript did cause problems there.

And finally one note:

All the points that i was making was always in CONTEXT with this post only. In this situation i dont think such a workaround is required. Thats it.


All your comments are debatable to ASP.NET as a whole.

I think that this point:
3) If the user doesn't have JS, your method will fail entirely.

made the discussion to ASP.NET as a whole. Not to just this post...

Known is handfull, Unknown is worldfull
 
Yup, we do that to test the security of the site. In this case the above script WILL FAIL, but we make i mandatory for users to hava javascript enabled.

Again it depends on the user base. My user base always supports JavaScript, we make it clear before taking up the project.
Yeah, that's fine if you know your user base and can dictate what they need to have (i.e. on an Intranet). However, I always assume that unless the poster states that they are building a site for an Intranet, that the website will be internet based and therefore they don't have the luxury of knowing their user base or being able to dictate that they have to have javascript enabled to use the site. Trying to tell users on an internet site what they have to use to view your site is just going to put people off from visiting and potentially give some users a bad experience.

All the points that i was making was always in CONTEXT with this post only. In this situation i dont think such a workaround is required. Thats it.
OK, that's fine but that is where we disagree. I think that a website should be acessible to all users regardless of how they view the site.

All your comments are debatable to ASP.NET as a whole.
Again, we will have to agree to disagree. ASP.NET websites, with careful planning and using the correct controls, don't have to rely on javascript and can be accessible to everyone. Granted, some controls do omit javascript so you have to be careful which ones you use and how you use them but personally I think that is because ASP.NET is aimed more at beginners. Advanced users of ASP.NET (and by that I mean web designers who make sure that their sites validate and are accesible) just look at the resulting markup and as such use the controls that will create the markup they want (not the other way round which is what I think the beginner audience tend to do).


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top