|
Afternoon All,
I'm really starting to get my teeth into this .Net thing and, for the most part, am getting it pretty good. Every once in a while I run into something I cannot find through my readings so please bear with me.
I have a page that receives some data using the "string var = Request.Form["this"]" syntax. My problem is that on the same page, I have some hidden fields. I want to populate the hidden fields with the values I have received so that I can pass the fields to another page, which at this time is still .asp. I know I could use another method by reading the PreviousPage controls but I cannot get the hidden fields values to populate.
Additionally, in the Intellisense, I don't see the hidden fields in the list.
If I am doing this wrong any help or direction would be greatly appreciated.
F
|
|
|
|
|
There's a server control, asp:Hidden or something. If you use that, you will be able to set values on the server. The only thing is, the client id for a server control is not the id you enter in the IDE, so you need to write the ClientID value to a variable if you use it in javascript.
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 )
|
|
|
|
|
They must have hidden that control from my list.
Thanks Christian for the road map.
I'm merrily along my way.
If so inclined, (could you expand on your point about the ClientID. Not quite sure I understand. I understand about the variable assignment but the "id is not the id" part that confused me.)
{}
else{
(Thanks again)}
|
|
|
|
|
On the server side, you may call it 'myHiddenId' ( I am not recommending that you do ). On the client side, it will be called something like 'form1_innercontrol_myHiddenId' ( that's just a bad example, not a real world one ). So, if you use document.getElementById to access the control from javascript, you would need to write a variable into your page in javascript so you have the right Id to work with, and you can get it from the ClientID property of the server control.
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 )
|
|
|
|
|
Got it.
Thanks for the clarity.
|
|
|
|
|
Glad to help
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
how can emulate button click in a site in my ASP.NET code?
(button is in another site)
tanks for your reply.
|
|
|
|
|
You can't. Your ASP.NET code will always run on your server, why would you want to control another site there ? Your client side code needs to be javascript, and if you're trying to interact with another site, it means you have it open in another browser instance to the one that contains your javascript code.
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 )
|
|
|
|
|
tank you Christian Graus for your reply.
really my company has a "sms data center" that several service on sms, such as dictionary, weather news, and ...
and my question is about this services. if we can emulate submit button means that we can have many services.
for example suppose an airport site that get airs program (flight program) that get proper data from user and get answer to user.
know if i can emulate submit click means that can have a new service for my "sms data center" solution.
now, can you help me?
|
|
|
|
|
Hi to all,
currently we're developping a tool in asp.net that will allow the user to open an image with the editor they want we're using the "open-with" dialog from windows with an javascript call on a clientclick. this works no problem
now after they open the file the asp.net page will be sitting and waiting for the image to be modified and saved (and not waiting for the editor to be closed, because some programs like photoshop take quite some time to open) so I've used the filesystemwatcher. I can catch the event with out a problem on the server side of the page but I can't seem to reload the page with the new image....
I know the call has been done asynchronocly and that this probable causing the problem. So I tried to use a clientscript with a history.go(0); and write it as a startup script but this doesnt seem to work either....
anyone got an idea? I would just need to reload the same page, with the same image when it is modified by saving it
Thanks in advance
its our widgets that make us men
|
|
|
|
|
Barbarus wrote: now after they open the file the asp.net page will be sitting and waiting for the image to be modified and saved (and not waiting for the editor to be closed, because some programs like photoshop take quite some time to open) so I've used the filesystemwatcher. I can catch the event with out a problem on the server side of the page but I can't seem to reload the page with the new image....
Simple answer is you can't (without using hacks/workarounds). The web browser is disconnected from the server so doesn't receive these events. One solution would be to have the page periodically reload the image using a refresh in javascript.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
|
sivaram praveen wrote: but javascript is not working
That's not a useful description of the problem. What does it do, and how does that differ from what you expected? Do you get any error message?
Why are you using a LinkButton? That will do a postback, so your javascript will never be called.
Experience is the sum of all the mistakes you have done.
|
|
|
|
|
Hello ppl,
I want to put a confirmation dialog box when a user clicks on the GridView Delete Command Button.
How can I do this?
Thanks
Rocky
You can't climb up a ladder with your hands in your pockets.
|
|
|
|
|
hi
after you insert a button in dataGridView , you can write follow code in onClientClick property :
OnClientClick="return confirm('are you ... ?')"
|
|
|
|
|
Thanks a lot man.
Rocky
You can't climb up a ladder with your hands in your pockets.
|
|
|
|
|
Just a quick question:
In ASP.Net are you encouraged to use controls such as the Panel for layout, rather than divs and whatever else you'd use in a plain olf HTML file?
Me: Can you see the "up" arrow?
User:Errr...ummm....no.
Me: Can you see an arrow that points upwards?
User: Oh yes, I see it now!
-Excerpt from a support call taken by me, 08/31/2007
|
|
|
|
|
martin_hughes wrote: In ASP.Net are you encouraged to use controls such as the Panel for layout, rather than divs and whatever else you'd use in a plain olf HTML file?
For me, I didn't have a need to use it, i am using tables as layout. Each control has it's own good and bad side.
|
|
|
|
|
You should use divs and stylesheets for web application page layout. Only use tables if you are wanting to display tabular data.
Panels are useful for example if you want to hide/unhide a number of controls. Easy to do if controls are on a single panel, just set panels visible property to true or false.
Take a look at http://asp.net/learn/videos/video-188.aspx for free video on CSS (Cascading Style Sheets). This gives an example of how to use divs and a stylesheet to layout a webpage in asp.net.
|
|
|
|
|
Magic - thanks Phil.
Me: Can you see the "up" arrow?
User:Errr...ummm....no.
Me: Can you see an arrow that points upwards?
User: Oh yes, I see it now!
-Excerpt from a support call taken by me, 08/31/2007
|
|
|
|
|
Couldn't have put it better myself.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hi,
I want to use Ajax Extensions on my web app.(ScriptManager,UpdatePanel,.. ).
The server (host) that I use must support any extra feature? (for example: ajax extension or ...)
Best wishes
|
|
|
|
|
mehrdadc48 wrote: The server (host) that I use must support any extra feature?
yes.
Contact provider, that will install the ajax axtension.
|
|
|
|
|
Hi
guys i have used ajax in my application, the problem is that it works fine on my local machine , but on live server it gives the following exception
Exception= Object reference not set to an instance of an object. Ajax at
Ajax.AjaxRequestProcessor.Run()
at Ajax.AjaxHandler.ProcessRequest(HttpContext context)
at
System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplicati
on.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&
completedSynchronously)
any one got the idea wht is the problem, kindly let me know asap, thankx in advance,
regards
|
|
|
|
|