|
Some problems with this
1 - you didn't put the variable in quotes
2 - Response.Write always puts the text at the top of the page, above the head tag, this is bad.
3 - RegisterClientScriptBlock lets you stop a script from being inserted more than once.
Ideally, if you want full control of the text's location, you should put it in the aspx, or put a literal control in the aspx that you can set to contain the script.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I need to do 3 Steps..
1.In java Script file, I've to get the value of textbox which is placed on .aspx file..
2.I've pass this value to another .aspx file to check whether the value of text box exsist in database..
3.Finally I have to pass a variable from the second .aspx file to the first .aspx file...
I did the above to...
I dont know the third one...that is my problem...
txtajaxscript.js
=================
var http = getHTTPObject();
var url="txtajaxcheck.aspx?id=";
function handleHttpResponse() {
if (http.readyState == 4) {
results = http.responseText;
document.getElementById("lbltxt").innerHTML= results;
}
}
function txtdisplay()
{
var txtvalue=document.getElementById("Text1").value;
document.getElementById("lbltxt").innerHTML=txtvalue ;
var http = getHTTPObject();
http.open("GET", url + escape(txtvalue), true);
http.onreadystatechange = handleHttpResponse;
http.send(null);
var role = "<%=role%>";
document.getElementById("lbltxt").innerHTML=role ;
}
function getHTTPObject() {
if (typeof XMLHttpRequest != 'undefined') {
return new XMLHttpRequest();
}
try {
return new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
return new ActiveXObject("Microsoft.XMLHTTP");
} catch (e) {}
}
return false;
}
now I have to pass a variable from txtajaxcheck.aspx to txtajaxscript.js...and I have to get a variable here which is sent by txtajaxcheck.aspx ...
Help me please....
Hi,Im Razana
|
|
|
|
|
Hi,
my situation is that I am creating an updater for my application that updates a reference library in the database.
I have a master library and a client library. I basically want to be able to compare the master library with the clients library and update where necessary.
I could achieve this with the merge datasets, then call get changes and update the database. However what I must avoid is that the client may have made changes to their library and I don't want to override there specific changes with the master database.
Any ideas how I might acomplish this?
Thanks
Paul
|
|
|
|
|
I suggest to use an approach of your own, not the Merge method. The Merge method updates the values in the target DataSet.
Why not just loop through all rows in the Master DataSet, look for a row in the CLient DataSet with same id (or something similar) and if none is found, then load the master row to the client DataSet.
Methods to use:
- foreach () for looping over Master DataSet
- FindById(id) for searching the row in Client DataSet (assuming it's a typed DataSet with PrimaryKey id)
- LoadRow(row) to load row into Client DataSet
Happy Programming
Urs
-^-^-^-^-^-
no risk no funk
|
|
|
|
|
Thanks for your reply.
I think we are going to stick with our XML approach but we were wondering if an object based approach was feasible.
With the XML approach we do the following:
1)Generate XML on the master database (contains updates/changes)
2)Then compare the XML with old XML generated on the last update.
3)Work through the XML and outputting where any changes are discovered.
4) The out put contains information on the row and particular field that is different
5)We can then call SQL to update the specific fields that have changed as well as insert/delete rows where appropriate.
Is there any easy way to do that using objects. Or is it best to stick with the XML approach?
Regards
Paul
|
|
|
|
|
I want to stop execution of the code for some minutes, how can i achieve that.
i.e
MessageBox.Show("Message 1");
//Stop for some min
MessageBox.Show("Message 2");
CAn you please give me a hint
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
Hello,
Thread.Sleep will do so!
All the best,
Martin
|
|
|
|
|
An alternative to Thread.Sleep is using a Timer.
Happy Programming
Urs
-^-^-^-^-^-
no risk no funk
|
|
|
|
|
MessageBox.Show doesn't have functionality to close the form. Write your own form, and have a method you call which shows the form modally, and runs a timer, then it closes itself.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
A form is actually doing nothing, just "sitting" on the screen, waiting for the user to use its graphical interface.
Put your code in a thread, and you can manage the execution of the thread the way you like.
SkyWalker
|
|
|
|
|
when i pass XmlDocument object (which is not null) as paramenter to a web service function from front end
But it remains null when i see it by debuggin in the web service function
What can be the cause.
Passing class object as parameter to web services
RSONS
|
|
|
|
|
same problem here while calling asp.net web service in PHP
any help
Ravi Kant Srivastava
(System Analyst)
HandsOn Technology & Engineering
Gurgaon
(India)
e-mail:ravikant@hte.co.in
|
|
|
|
|
Hi
I have solved the problem by sending XmlNode instead of XMLDocument as parameter to function
From client side i am sending objXmlDoument.DocumentElement to ws function
Plz check it in your asp.net and php
I think it ll also help you
|
|
|
|
|
hi,
i have to inherit from multiple classes. a base class i wrote, and a wpf class, like Image or so, because i'm writing some custom controls.
i know c# doesn't have multiple inheritance. how can i achieve multiple inheritance functionality?
thanks,
donovan
rather have something you don't need, than need something you don't have
|
|
|
|
|
|
|
The official way of simulating multiple inheritance is to combine single inheritance with composition.
Kevin
|
|
|
|
|
thanks,but how can i use the code that adds my custom event handlers in my class when i convert it to an interface?
rather have something you don't need, than need something you don't have
|
|
|
|
|
In C#, multiple inheritance is not an option, you may only inherit from one base class.
If you are not satisfied with the "interface" approach, then you might consider extending one class and creating a member of the new class of the type implemented by your second class. That way, you'll be able to benefit from the methods of the second class.
SkyWalker
|
|
|
|
|
Using .net 2.0 A generic collection is populated. i.e. ForwardsCol
There are three fields in this collection. i.e. ID, Name, Lastname
At present the data in the collection is not sorted.
How is it possible to sort the data by Name?
Is this to do with:
ForwardsCol.Sort(Name) ?
Thanks
|
|
|
|
|
|
New verion of Generics.Net is coming next week. That will solve your problem...
|
|
|
|
|
Please provide more information. i.e. where to download and look for it, etc...
Thanks
|
|
|
|
|
Please provide more information. i.e. where to look and download from...
Thanks
|
|
|
|
|
hi all,
I have devloped and custom toolbar in C# and band objects.I have problem while installing the toolbar.I can able to install, but i cannot view them.Can we use installer class for custom installation.If so please let me know
regards
ravindra
|
|
|
|