hai all,
i am using, ajax and c#.net.
my problem is,
i want to store a huge data in database using(c#), which is done in behind the screen. when i get data from a html textarea(more than 2000 characters), and pass to c# page through query string from javascript(ajax). i cant pass the value. what is the solution to do this.
thanx in advance.
with lov
Nirmal
25 2561
hai all,
i am using, ajax and c#.net.
my problem is,
i want to store a huge data in database using(c#), which is done in behind the screen. when i get data from a html textarea(more than 2000 characters), and pass to c# page through query string from javascript(ajax). i cant pass the value. what is the solution to do this.
thanx in advance.
with lov
Nirmal
Simply use "POST" method.
Debasis Jana
Simply use "POST" method.
Debasis Jana
i am getting permission denied error.
i am getting permission denied error.
Post your Code here.
Debasis Jana
Post your Code here.
Debasis Jana
I pass more than 2000 character field parameter in terms and tried to save. -
var termsxmlHttp=null;
-
//Calling Ajax Page Function
-
function CallAjax(param,terms,mode,term_id)
-
{
-
-
termsxmlHttp=termsGetXmlHttpObject();
-
if (termsxmlHttp==null)
-
{
-
alert ("Your browser does not support AJAX!");
-
return;
-
}
-
-
var url="../Ajax_Pages/aj_terms_conditions.aspx";
-
url=url+"?Ref="+param;
-
url=url+"&Terms="+terms;
-
url=url+"&mode="+mode;
-
url=url+"&terms_id="+ term_id;
-
url=url+"&sid="+Math.random();
-
termsxmlHttp.onreadystatechange=termsstateChanged;
-
termsxmlHttp.open("POST",url,true);
-
termsxmlHttp.send(null);
-
//changed
-
}
-
-
////
-
-
function termsGetXmlHttpObject()
-
{
-
var termsGetxmlHttp=null;
-
try
-
{
-
// Firefox, Opera 8.0+, Safari
-
termsGetxmlHttp=new XMLHttpRequest();
-
}
-
catch (e)
-
{
-
// Internet Explorer
-
try
-
{
-
termsGetxmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
-
}
-
catch (e)
-
{
-
termsGetxmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
-
}
-
}
-
return termsGetxmlHttp;
-
}
-
-
///
-
-
function termsstateChanged()
-
{
-
if (termsxmlHttp.readyState==4)
-
{
-
-
hideProgressImage("DisplayMsg", "displayError", "btnClose");
-
var strArr = new Array();
-
strArr = termsxmlHttp.responseText.split("^");
-
document.getElementById("DisplayMsg").innerHTML =strArr[0];
-
if (strArr[1]==1)
-
{
-
document.getElementById("displayError").style.color="Green";
-
}
-
else if (strArr[1]==2)
-
{
-
document.getElementById("displayError").style.color="Red";
-
}
-
document.getElementById("displayError").style.visibility = 'visible';
-
document.getElementById("btnClose").style.visibility = 'visible';
-
document.getElementById("btnClose").focus();
-
document.getElementById("txtRef").value="";
-
document.getElementById("txtTerms").value="";
-
document.getElementById("terms_id").value="0";
-
document.getElementById("hmode").value = "Save";
-
CallAjaxList(1,'','','../Ajax_Pages/aj_terms_conditions.aspx');//nirmal from 21
-
}
-
}
-
I think you are using IE.
Then enable your Activex Control.
Debasis Jana
I think you are using IE.
Then enable your Activex Control.
Debasis Jana
yes of course, i'm using ie, how to enable the activex control?
with lov
Nirmal
yes of course, i'm using ie, how to enable the activex control?
with lov
Nirmal
Tools->Internet Options->Security Tab->Custob Level->[automatic prompting for activex control=>disable,download activex control=>enable,intialize and script activex ..... =>enable,run activex control=>enable and script activex controls ... =>enable]
Debasis Jana
Tools->Internet Options->Security Tab->Custob Level->[automatic prompting for activex control=>disable,download activex control=>enable,intialize and script activex ..... =>enable,run activex control=>enable and script activex controls ... =>enable]
Debasis Jana
I have done as u said, but still i am getting unspecified error.
I have done as u said, but still i am getting unspecified error.
Do one thing ..... Simply try this code. -
try
-
{
-
termsGetxmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
-
}
-
catch (e)
-
{
-
termsGetxmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
-
}
-
Actually the error comes from here or somewhere else.
Let me know that please.
Debasis Jana
Do one thing ..... Simply try this code. -
try
-
{
-
termsGetxmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
-
}
-
catch (e)
-
{
-
termsGetxmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
-
}
-
Actually the error comes from here or somewhere else.
Let me know that please.
Debasis Jana
thanx jana but,
same thing is done in my posted code line no:38 to 46.
and also refer this link http://www.webmasterworld.com/forum21/6607.htm
thanx jana but,
same thing is done in my posted code line no:38 to 46.
and also refer this link http://www.webmasterworld.com/forum21/6607.htm
So you have that error from somewhere else.
Right?
So you have the error with "Query String"?
Did you do with "POST" method.
Have a look at this code fragment. -
xhreq.open("post", "sumPostForm.phtml", true);
-
xhReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
-
var query = "param1=paramvalue1¶m2=paramvalue2..............................";
-
xhReq.send(query);
-
Good Luck with this code !
Debasis Jana.
So you have that error from somewhere else.
Right?
So you have the error with "Query String"?
Did you do with "POST" method.
Have a look at this code fragment. -
xhreq.open("post", "sumPostForm.phtml", true);
-
xhReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
-
var query = "param1=paramvalue1¶m2=paramvalue2..............................";
-
xhReq.send(query);
-
Good Luck with this code !
Debasis Jana.
this is very new for me. can u integrate this code with previously posted code by me, i don't know how to use this.
this is very new for me. can u integrate this code with previously posted code by me, i don't know how to use this.
First let me know with that code fragment "ActiveXObject" is working without error.
First let me know that, then I will integrate that one.
Debasis Jana
First let me know with that code fragment "ActiveXObject" is working without error.
First let me know that, then I will integrate that one.
Debasis Jana
dear jana
code fragment "ActiveXObject" is working without error.
dear jana
code fragment "ActiveXObject" is working without error.
One more thing let me know.
Tell me the length of url by alerting that url.
Is that more than "1350"? -
alert(url.length); //after setting all parameters how long it is ....
-
If it is then, try this one .............. -
termsxmlHttp.open("POST",url,true);
-
termsxmlHttp.onreadystatechange=termsstateChanged;
-
termsxmlHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
-
termsxmlHttp.send(url);
-
Debasis Jana
One more thing let me know.
Tell me the length of url by alerting that url.
Is that more than "1350"? -
alert(url.length); //after setting all parameters how long it is ....
-
If it is then, try this one .............. -
termsxmlHttp.open("POST",url,true);
-
termsxmlHttp.onreadystatechange=termsstateChanged;
-
termsxmlHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
-
termsxmlHttp.send(url);
-
Debasis Jana
yes, it is more than 1350. that is 2576(according to my parameter i passed to save).
yes, it is more than 1350. that is 2576(according to my parameter i passed to save).
Then use my Code.
Debasis Jana
Then use my Code.
Debasis Jana
sorry jana,
still i am getting unspecified error!
Oppssss !
Sorry the code mistyped. -
var url="Ref="+param;
-
url=url+"&Terms="+terms;
-
url=url+"&mode="+mode;
-
url=url+"&terms_id="+ term_id;
-
url=url+"&sid="+Math.random();
-
termsxmlHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
-
termsxmlHttp.onreadystatechange=termsstateChanged;
-
termsxmlHttp.open("POST","../Ajax_Pages/aj_terms_conditions.aspx",true);
-
termsxmlHttp.send(url);
-
Now have a try with this.
Good Luck !
Debasis Jana
Oppssss !
Sorry the code mistyped. -
var url="Ref="+param;
-
url=url+"&Terms="+terms;
-
url=url+"&mode="+mode;
-
url=url+"&terms_id="+ term_id;
-
url=url+"&sid="+Math.random();
-
termsxmlHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
-
termsxmlHttp.onreadystatechange=termsstateChanged;
-
termsxmlHttp.open("POST","../Ajax_Pages/aj_terms_conditions.aspx",true);
-
termsxmlHttp.send(url);
-
Now have a try with this.
Good Luck !
Debasis Jana
sorry to say jana.
again the same problem.
unspecified error in ie
and
uncaught error in firefox.
sorry to say jana.
again the same problem.
unspecified error in ie
and
uncaught error in firefox.
I am trying to update the "function termsstateChanged()"
Just try this and let me know what happens. -
function termsstateChanged()
-
{
-
if (termsxmlHttp.readyState==4 && termsxmlHttp.status==200)
-
alert("Ajax Call Done ......... Yahoo!!!");
-
}
-
Please let me know, whether you get the alert or not?
Debasis Jana
I am trying to update the "function termsstateChanged()"
Just try this and let me know what happens. -
function termsstateChanged()
-
{
-
if (termsxmlHttp.readyState==4 && termsxmlHttp.status==200)
-
alert("Ajax Call Done ......... Yahoo!!!");
-
}
-
Please let me know, whether you get the alert or not?
Debasis Jana
the error occured b4 statechanged function. so no alert displayed.
the error occured b4 statechanged function. so no alert displayed.
Try it ............. -
function termsstateChanged()
-
{
-
alert("helllo world");
-
if (termsxmlHttp.readyState==4 && termsxmlHttp.status==200)
-
alert("Ajax Call Done ......... Yahoo!!!");
-
}
-
-
Watch it, how many times "hello world" gets alerted.
Good Luck !
Debasis Jana
Try it ............. -
function termsstateChanged()
-
{
-
alert("helllo world");
-
if (termsxmlHttp.readyState==4 && termsxmlHttp.status==200)
-
alert("Ajax Call Done ......... Yahoo!!!");
-
}
-
-
Watch it, how many times "hello world" gets alerted.
Good Luck !
Debasis Jana
thanx jana.
i tried but no alert is dsipalyed.
thanx jana.
i tried but no alert is dsipalyed.
Send me the code, so far what you tried.
Debasis Jana
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Durairaj Avasi |
last post by:
#!/usr/bin/perl -w
use Net::LDAP;
use Net::LDAP::Util qw(ldap_error_name ldap_error_text);
my $ldap = Net::LDAP->new('xy.webdurai.net', port=> 389) or die "$@";
$ldap->debug(15);
my @args = (...
|
by: Miranda Evans |
last post by:
I noticed several postings about issues related to "run-time error
3061", and I observed that the solutions to these issues appear to
involve correcting something within the SQL code. I'm...
|
by: Brian Mink |
last post by:
I am having trouble getting one database to export data that another
one can import. The problem is a dash "-". I have a group of numbers
entered in my database that have a dash in them (e.g....
|
by: acni |
last post by:
I have the following peice of code to try and send an email to selected
contacts in my form.The problem is this line:
StrStore = DLookup("", "qrySelectEmail", "??????")
This looks up the email...
|
by: Proc |
last post by:
I am hoping someone here can point me in the right direction with a
problem my user's are experiencing. Here is what is happening:
I have an ASP.NET application that several users will use at...
|
by: stewart.fay |
last post by:
Dear all,
I am using the HttpWebRequest and HttpWebRequest to send an XML request
to an ASPX page.
When I use the browser and add my XML request the request is posted
fine and an answer is...
|
by: Kelii |
last post by:
I've been trying to get this piece to work for a few hours, but have
given up. I hope someone out there can help, I think the issue is
relatively straightforward, but being a novice, I'm stumped....
|
by: wkerplunk |
last post by:
Below is what I have build with several different languages. It works great but I need help, I am stuck.
When you click on an item in the dropdown autocomplete div it does a mousedown function...
|
by: nirmalsingh |
last post by:
hai all,
i am using, ajax and c#.net.
my problem is,
i want to store a huge data in database using(c#), which is done in behind the screen. when i get data from a html textarea(more than...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |