|
I don't quite understand what your whole problem is.
Perhaps if you write a more concise question you can get a better answer.
Regarding the "potential malicious" problem, ASP.Net by default checks that any user input does not contain HTML or scripts that may be dangerous.
To turn this off, you need to set ValidateRequest="false" on the <% Page %> attribute in your aspx file.
Hopefully this solves your problem.
"Democracy is two wolves and a sheep voting on what to have for dinner" - Ross
Edbert
Sydney, Australia
|
|
|
|
|
there is no question regarding the "potential malicious" problem
there is no question on the real use of the true autocomplete
which comprises itself (one textbox)
i already implemented to others pages
except for this particular business rule
when implement like an autocomplete
where i nid to also display its corresponding description
to another text box control or label control
the problem is when i populated the first textbox (where u type) in
page load (like edit mode) the potential blah blah occurs at text box
of description, if label control its javascript error
in add mode or when textbox initially is blank its ok
the text box of the description is loaded
is this really the case with ajax, that i can't implement it
coz populating the value initially already a potential malicious etc.
currently, im just using the regular autopostback (without ajax)
wanted to use ajax, so i can minimize autopostback
what the autopostback does is when u input the first and the postback
fires, i populate the description
i also have a dialog lookup
the code was actually based on part 1 only "Ajax was here - part 1:
client side framework", article by Bill Pierce
already implemented his part3 which only required autocomplete
sory im new in ajax,
thx
-- modified at 15:24 Monday 24th July, 2006
|
|
|
|
|
Heyho Guys,
I'm looking for some good Tutorials for Ajax and ASP. Till now I programmed everything web-based in PHP but somehow ASP and Ajax seem to be pretty interesting. So I want to learn them. Do you know any good tutorials ?
|
|
|
|
|
Heyho,
i am for my self not the Webdevelopment expert, but if you want to learn Asp.net it was good learning a Microsoft .Net language, like C# or VB.Net. You should download the Expressversion from the Visual Studio (look here for it http://asp.net/downloads/essential.aspx?tabid=62 ). On ASP.Net are also some tutorials, but you should also google a littel bit.
Iam not sure about Ayax, i think it is only a Javascript think... You Sending HTML requests per javascript back to the server, sure you need server software who can allow to hande it. If you want only Ajax you can also do it with PHP, look here : http://developer.mozilla.org/de/docs/AJAX:Getting_Started
For a general overwiev:
http://en.wikipedia.org/wiki/Ajax_%28programming%29
|
|
|
|
|
Hello!
I'm trying to use the Autocomplete for the AjaxPro.dll from:
http://munich.schwarz-interactive.de/autocomplete.aspx
I keep getting "Object Expected" in my javascript on my .js include file along with that in the HTML body.
I've added this to my web.config file:
<httpHandlers>
<add verb="POST,GET" path="ajaxpro/*.ashx" type="AjaxPro.AjaxHandlerFactory, AjaxPro"/>
</httpHandlers>
</system.web>
**********
**********
My code behind is trying to return names from my table (for starters) so I can see the names with the autosuggest:
<AjaxPro.AjaxMethod()> _
Public Function SearchAdvanced(ByVal orderNumber As String, ByVal customerID As Integer, ByVal count As Integer) As DataTable
Dim ds As DataSet = New DataSet
Dim sCon1 As New SqlConnection
sCon1.ConnectionString = Session("DBDDL")
Dim cmd As New SqlCommand("SELECT Authority FROM Signature_Authority_Names WHERE Authority like @CustomerID") '+
'"AND OrderNumber LIKE @OrderNumber " +
'"ORDER BY OrderNumber, PartNumber, JobNumber", conn)
cmd.Parameters.Add("@CustomerID", customerID)
'cmd.Parameters.Add("@OrderNumber", orderNumber + "%")
Try
sCon1.Open()
Try
Dim da As SqlDataAdapter = New SqlDataAdapter(cmd)
da.Fill(ds)
Finally
sCon1.Close()
End Try
Catch
Return Nothing
End Try
'Return ds.Tables
Return ds.Tables(0)
End Function
**********
**********
My HTML is:
<body>
<script type="text/javascript" src="scripts/autocomplete.js"></script>
<script type="text/javascript">
//Code for Autocomplete
function init() {
var x = new MS.Web.AutoCompleteDataTable("searchCustomerID", 10);
x.getDisplay = function(item) {
return (item != null ? item.Authority : "");
}
x.getValue = function(item) {
return (item != null ? item.Authority.toString().trimRight() : "");
}
x.getData = function() {
Namespace.ClassName.AjaxMethod(this.ele.value, this.count, this.callback.bind(this));
}
}
addEvent(window, "load", init); //error received on this line
//End Code for Autocomplete
</script>
<form id="Form1" method="post" runat="server">
<TABLE id="Table1">
<TR>
<TD><INPUT id="searchCustomerID" type="text" size="62">
</TD>
</TR>
</TABLE>
</form>
....I get an error on the line for addEvent(window, "load", init); saying "Object Expected"
**********
**********
My first error, "object expected" is received in this .js file on line one:
addNamespace("MS.Web.AutoComplete");
MS.Web.AutoComplete = Class.create();
Object.extend(MS.Web.AutoComplete.prototype, {
timer: null,
count: 10,
pos: -1,
waitAfterInput: 230,
minChars: 0,
children: null,
I'm using IE6 Sp2
|
|
|
|
|
A pretty basic question.
Well I am running XP home and I think its set up with a Localhost.
How do I find the physical directories it goes to ?
Like I just installed oracle express and before that ms sql.
the web browser address look like this
http://127.0.0.1:8080/apex/f?p=4500:1000:4433621472321981:::::
well thats what its doing when I am going through admin duties with Oracle.
thx for your patience !
|
|
|
|
|
XP Home won't run IIS (not without some major registry hacks, etc) so I'm guessing Oracle has it's own server. I would check Oracle's documentation.
|
|
|
|
|
It does - installs Apache on port 8080 - hence the URL..
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
Hi, I have a flash graphic in my header on home page, but when the page loads you get that thick border around it when the mouse hovers over it, and a message saying "Click to activate and use this control". How do i prevent that?
Thanx
Regards,
Tintin
|
|
|
|
|
|
Hi, I have a problem when redirecting through links. As soon as a page in say directory products is opened ie. /products/p1.html, the menu links on the header don't work right! Lets say you click home (index.html) then it tries to redirect you to /products/index.html instead of /index.html.
Is there a type of absolute path syntax?
Please help.
Regards,
Tintin
|
|
|
|
|
What you need here is "../index.html", which will take you up one directory level. If you are using response.redirect in asp.net on the server side, then you can use ~/index.html and ~/products/p1.html to build paths from the root.
|
|
|
|
|
Hi
I'm Making a Web Application in Asp.Net 1.1
My Designer has given me HTML for the Admin part.He has used "style="removed: url(images/tab2.gif)" tag for background image.but what i found that Asp.net 1.1 does not support style.
it eliminate this automatically and background images got disappear.
is there any other alternative for it or any appropriate solution for this problem.thanx
|
|
|
|
|
ASP.net does support style attributes. Where is this being input?
|
|
|
|
|
Hi,
I am working on C# .NET. I have generated a report using crystal report and displayed it on a .aspx page using report viewer. There is a button on the .aspx page which when clicked will print the report. When the orientation of the page in crystal report is set to 'protrait', i am getting the printout of the report. But when orientation is changed to 'Landscape', I am getting a blank printout. For printing the report i am using javascipt. The code i am using is below.
function callPrint()
{
var PrintSTAT='';
PrintSTAT="";
PrintSTAT+="";
PrintSTAT+="";
var winPrint=window.open('','','');
winPrint.document.write(PrintSTAT);
winPrint.document.close();
winPrint.focus();
winPrint.print();
winPrint.close();
return false;
}
Here LinkName is a doc file in which i am exporting the report.
Help me out.
Regards,
Arvind Sharma
|
|
|
|
|
I'm working on a site where I make heavy use of css nesting and its starting to get problemmatic.
Is there a way to define an exact sequence of elements?
Basically I want:
<br />
#ContentArea .Title {}<br />
in
<br />
<div id="ContentArea"><br />
<div class="Title">This is the Area</div><br />
<div class="Content"><br />
<div class="NewsItem"><br />
<div class="Title">Blah blah</div><br />
<div class="Body">Hhere is the body with lots of text.</div><br />
</div><br />
</div><br />
</div><br />
To only apply to the first .Title, because as it is it drops through to the .Title inside .NewsItem.
|
|
|
|
|
One thing you could do is to define a different style for the nested title that specifies different values for all the style attributes set in the other style:
#ContentArea .Title
{
}
#ContentArea .Content .NewsItem .Title
{
}
Or, you could just give a different class name for the nested div.
|
|
|
|
|
Your problem here dear CPian is conceptual rather than technical.
The idea of not using tables for the layout of the advantage of giving conceptual meaning to our the tags and its class names/ids etc...
Once you have 2 classes with the same name in the same page you instanly destroy the idea of conceptual and human underastandable HTML code. I suggest you change your code and use H tags for the titles. H1 for the one and H2 for the other without using any class names.
e.g.
<br />
<br />
#ContentArea H1 {...}<br />
<br />
<br />
#ContentArea .Content .NewsItem H2 {...}<br />
<br />
<br />
#ContentArea .Content .NewsItem P {...}<br />
In addition, I would suggs tyou used a P tag for the news body. e.g.
<br />
<div id="ContentArea"><br />
<H1>This is the Area</H1><br />
<div class="Content"><br />
<div class="NewsItem"><br />
<H2>Blah blah</H2><br />
< P>Hhere is the body with lots of text.</P><br />
</div><br />
</div><br />
</div><br />
|
|
|
|
|
Hi All,
I am trying to encrypt the query string from page to page...so the calling page must encrypt the query string, and the called page must decrypt it...
When I run it without encryption (same code), I have no problems. When I try with the encrypted query string, I get the following message...
Microsoft VBScript runtime error '800a01a8'
Object required: 'objSharedCrypto'
/shared/includes/Crypt.asp, line 52
This is where we are decrypting...
Dim QSColl, strRequestQS<br />
Set QSColl = RequestQS2()<br />
<br />
rptid = QSColl("rptid")<br />
dataid = QSColl("dataid")<br />
If dataid = "" Then dataid = rptid<br />
DataSession = "RPT-" & dataid<br />
strUDBId = Session("VMAccount")
This is the RequestQS2 function I am calling
Function RequestQS2()<br />
Dim objQS, key<br />
Dim objQSDict<br />
Dim strQS ' Set to Request.QueryString.<br />
<br />
strQS = Request.QueryString<br />
If EncryptedQS() Then<br />
Set objQS = DecryptToQS(strQS, Salt())<br />
'Set objQSDict = Server.CreateObject("Scripting.Dictionary")<br />
<br />
'For Each key In objQS<br />
' objQSDict.Add LCase(key), objQS(key)<br />
'Next<br />
Set RequestQS2 = objQS<br />
<br />
Set objQS = Nothing<br />
Set objQSDict = Nothing<br />
Else<br />
Set RequestQS2 = Request.QueryString<br />
End If<br />
End Function
Which in turn calls on the DecryptToQS function below if the query string is indeed encypted
Function DecryptToQS(ByVal Str, ByVal Salt)<br />
If EncryptedStr(Str) Then<br />
' Remove Prefix.<br />
Str = Right(Str, Len(Str) - Len(QSPrefix()))<br />
Set DecryptToQS = objSharedCrypto.DecryptToQueryString(Str, "eFinanceIt", Salt) <br />
Else<br />
DecryptToQS = Str<br />
End If<br />
End Function
this is line 52 in shared/includes/crypt.asp
Set DecryptToQS = objSharedCrypto.DecryptToQueryString(Str, "eFinanceIt", Salt)
on the first line of Crypt.asp there is the following declaration
Dim objSharedCrypto<br />
Set objSharedCrypto = Server.CreateObject("Crypto.QueryString")
So I am not sure what the problem is, I've used the function with other pages, and it works fine...something is happening with this particular page however.
Any ideas or suggestions?
I appreciate the help
Thanks
|
|
|
|
|
I've figured it out....I had an include statement which was already creating the object...I just had to move the include from the bottom of the script to the top
|
|
|
|
|
How to Compare two dates selected from two different date picker or calendar
rahman
|
|
|
|
|
you can compare two dates using java script function builtin Date function.
here is a sample
if (Date.parse(startDate) > Date.parse(endDate))
{
alert("End date must be greater than or equal to the Start date");
return(false);
}
hope this helps
|
|
|
|
|
Hi Im new to asp and I need to automatically create a csv file using the following line of code
"set fs = fso.CreateTextFile(Server.MapPath(variable & ".csv"), true)"
the problem is I need the file name to be a value of a record set field.
Not sure if this can be done or not
jimmyfitz
|
|
|
|
|
Shouldn't be a problem, as long as the recordset field is a valid filename.
Set fs = fso.CreateTextFile(Server.MapPath(recordset("fieldname") & ".csv"), True)
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
Why i keep saving a blank data to the database... but my textbox actually contains something
i@@
|
|
|
|