|
You can't use AJAX to load an image.
If you need a call to the server to find out the name of the image, you can use AJAX, but the loading of the image itself is done by the browser.
If you don't need a call to the server to find out the name of the image, you don't need AJAX at all.
---
b { font-weight: normal; }
|
|
|
|
|
perhaps this be your answer :
var img=new Image();
MyImage.src="newImage.jpg";
function Change()
{
document.images[0].src=MyImage.src;
}
now you can call Change function to load new Image without postback.
|
|
|
|
|
Hi..
How could we make solutions for the following actions using ASP.NET 1.1 ? :
1-User Forgot his Password.
2-User choosed to Save his Password.
I am too late but i will never give up
|
|
|
|
|
Hi,
Are you using Forms Authentication???.........If you go and check forms authentication you should be able to do this....
Good luck
Happy Programming
Sanjeev
|
|
|
|
|
Thank you for your respond..
Yes Iam using Forms Authentication.May you explain to me at least the solutions ideas?.
I am too late but i will never give up
|
|
|
|
|
i have web-form control namely textbox1 ,and button1
if user enter 4 in textbox1 and click button1
then 4 text box will appear on client side
omi
|
|
|
|
|
I don't have the foogiest idea of what you are trying to say.
--------------------------------------------------------
My portfolio & development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
I'm building an application for students to answer test questions, and later get feedback on their learning. I have an SQL database holding the questions and their associated multiple choice answers. Answers to each question have an integer ID number, starting at one. The correct answer is always ID 1.
I want to be able to display the multiple choices in a ListBox, in a random order. At the moment I have an SQL call to the database to extract the appropriate answers, ordered by NewID (random). These fill a DataSet and this is then used to fill a Hashtable of the AnswerID and Answer Text pairs.
While the items are placed into the Hashtable in the random order that they were retrieved from the database, they seem to reorder themselves numerically once in the Hashtable. Therefore when my ListBox (showing only the answer text) binds to the Hashtable it always shows the correct answer in the last slot in the list.
How can I ensure that the items in either the Hashtable or the ListBox are randomized?
Many thanks,
Alice
|
|
|
|
|
The data in a hash table is stored according to the hash code of the keys, so if you have the same keys, you will always get the same order. If you want to maintain the order that the data was fetched in, don't use a hash table.
I would not put the correct answer as always having id 1. If someone views the source of the page, it wouldn't be that hard to figure out the pattern.
---
b { font-weight: normal; }
|
|
|
|
|
hi all, i have a problem need your help.
How to insert a menu created by sothink dhtml menu in a asp.net page created in Visual Studio 2005.
Thanhks in advance
|
|
|
|
|
Hi,
I'm trying to use callback function to send a randon number to the client. My code works on a normal page, but not on a page with Masterpage.
My JavaScript is:
//To call the function in the Server
function GetNumber() {
UseCallBack();
}
// To retrive the value from the server to display it in the TextBox1
function GetRandomNumberFromServer(arg, context) {
document.cforms[0].TextBox1.value = arg;
}
So is there anything I should change?
Thanks,
Si Jia
|
|
|
|
|
What do you mean by it's not working on the web page using MasterPage? Is that the problem of accessing the textbox element? If so, you may need to view source the web page to have an idea about the id of the textbox at the client side.
|
|
|
|
|
Cool. Thank you so much
After I View the source code during the runtime, I find the ID of the textbox.
The ID of the textbox is "ctl00$ContentPlaceHolder1$TextBox1" The name of the textbox is just TextBox1 and the "ct100" I don't know what it means but it's just there.
Just in case someone has the same problem with me.
Cheers,
|
|
|
|
|
The ctl00 is the ID of the master page instance at runtime, you can set the Trace="true" in the Page directive, browse the web page and look at the control tree section that may give you some information.
|
|
|
|
|
hello all,
i have the following problem:
in a page i render the html output of a calendar control manually by cal.render(writer)
in first second it look ok but unfortunately there is no functionality rendered to the output. That means no links, no script code, ...
Is there a trick to render the needed java script code to the resulting HTML?
thanks, bernd
|
|
|
|
|
hmm, you may think this does not make sense, but i try to create some aspx stuff by ironPython and so i haven't not a real aspx enviroment. That means i haven't a page_load event or something like that. Does someone of you know some details about the rendering process of webcontrolls in common? For example which method renders script code, who call's this method and when is it called?
i'll be happy about any suggestion. Thanks
Bernd
|
|
|
|
|
Hi there,
You may want to look at the Page Object Model[^] and Page Life Cycle[^] that may give you some ideas. Basically, the common script which can be reused in the web page will be emitted by the Page instance, and the control-specific script can be rendered by the control itself. Which script are you talking about?
|
|
|
|
|
hey minhpc_bk, nice to read you!
i.E the function '__doPostBack' and all call's to that function are missing. actualy no links aren't rendered. you can take a look at www.gmc.li. First i'll check out your posted link's.
thanks, bernd
-- modified at 10:29 Monday 2nd October, 2006
stop - the function will be rendered!! In my control isn't set the Property 'Page' which can explain a lot
-- modified at 16:51 Monday 2nd October, 2006
false alarm the script was rendered by another aspx control. still with no idea. isn't there a property 'enableClientScripting' ore something else? Please take a look at the code[^] here, maybe one of you can see my big mistake.
|
|
|
|
|
To work around the error of not being placed outside the server form element, you'll have two options here:
+ Extend the Page class, override the VerifyRenderingInServerForm method and leave it empty.
+ Extend the Calendar control and override the Render method to skip the calling to the VerifyRenderingInServerForm of the Page instance.
Below is the sample code for the first option which IMO is much simpler:
public class ExPage : Page
{
public override void VerifyRenderingInServerForm(Control control)
{
}
}
|
|
|
|
|
|
hi
i buil a tree( with script) i can drag and drop , i can add and remove control but i cant save this change when i refresh the page all the node i added clear and i cant see the new node that i add .
how can i save this changes?
-- modified at 6:27 Sunday 1st October, 2006
|
|
|
|
|
I want to show a piping diagram on the webpage with the movement of fluid in it. The piping should stay as such with only the fluid movement getting refreshed every 30 secs. Is it possible to have a fixed image and a moving point superimposed on the webpage ? Only the moving point should be loaded everytime ?
anuj
|
|
|
|
|
I'm using V.Studio 2005 to program ASP.NET 2.0 pages.
For every first debug run of my app, a dialog box
titled "Debugging Not Enabled" will show. It always
has two options:
1. Modify the Web.config file to enable debugging
2. Run without debugging. (Equivalent to Ctrl+F5)
I always have to select one of the option to continue
with. Is there any setting I can adjust to eliminate
this message box for all subsequent new ASP.NET pages?
Thanks for your reply...
Pedestrian, Penang.
|
|
|
|
|
First you may have to read this:
from msdn.
However VS automatically adds the debug=false to the compilation property in the web site project's web.config file.
Hence you may have to change the VS template - to assign the value "true".
Recall that you should set debug=false before deploying in order to remove all debugging information.
VS template reference could be found in:
Visual Studio Template Reference
and you can find more articles on the web.
Finally, there may be a very simple way to acomplish this - nothing that I know about.
Best regards,
elaj
|
|
|
|
|
Elaj, thanks a lot for your valuable answer.
Pedestrian, Penang.
|
|
|
|