|
this simple example will demonstate
how to dis allow certain chars
<html>
<head>
<script>
restictIt = (function(){
var args = arguments;
return function(el){
for(var i=args.length;i--;){
if (el.value.indexOf(args[i]) != -1){
el.value = el.value.substring(0,el.value.length-1);
}
}
}
})('a','b','c')
</script>
</head>
<body>
<input type=text onkeyup="restictIt(this)">
</body>
</html>
modified on Tuesday, September 14, 2010 12:38 PM
|
|
|
|
|
Use the RegularExpressionValidator class.
|
|
|
|
|
To connect to database (sql server) im using the following
con = New SqlConnection("Network Library =DBMSSOCN; server =ipaddress; database = dvk; user id = sa; password ="";timeout = 60")
where ipaddress is the server ipaddress and it is like this 20.0.0.200
but recently my server ip adress is changed and i replaced it in the connectionstring
but it is not working it is showing that webserver not found.
should i configure the sqlserver with new ipaddress
|
|
|
|
|
You have to make sure the SQL Server is configured properly to allow for remote access.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
im using SQLSERVER 2000 and it is configured to allow remote access
till now i gone through connecting server using ip address
can u tell me ,what settings to be made to server for connecting
it through server name. my server name is BDPLServer1
and i have a small doubt regarding this
if any one trying with the same server name and accessing my database
is it possible
|
|
|
|
|
If you can connect via the IP address but not using the DNS name, then it would seem to indicate you have an issue with you machine not being able to resolve the DNS. Contact your network people.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
i can access the sqlserver using the server name in my local system
in my system there is no sqlserver installed and
when i upload the page and run it on browser then it does not work.
|
|
|
|
|
This is a classic example of why you should not refer to your servers by IP address, if the network guys reconfigure your network, boom ! Your applications break.
Let the network guys do their thing, let the developers do theirs.
I'm getting off my soapbox now.
|
|
|
|
|
While I agree that server names are better, I have had just as much trouble with Network guys F* up the DNS requiring the use of IP Addresses instead as the more reliable solution. There has been a noticeable increase in lazy sys-admins.
|
|
|
|
|
as u said,i given the server name instead of ipaddress
like this
con = New SqlConnection("Network Library =DBMSSOCN; server =server1ABN; database = dvk; user id = sa; password ="";timeout = 60")
but i get this error
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 0 - No such host is known.)
all configurations are enabled to Sqlserver.
only a ipadress of the server is changed.
if ipadress of the server is changed then do we have to reconfigure the sqlserver with new ipadress
from the past 1 week the website is running properly
now the same server is configured with a new ipaddress
This problem occurred with the changing of ipaddress
can u help me
|
|
|
|
|
Is it the same server or are you pointing to a new server? If it is a new server make sure it is configured to accept TCP connections and not just named pipes if you are going to specify the network library. Are you sure there are no firewalls in between your web server and SQL server that could be restricting traffic on port 1433?
Oh and by the way NEVER EVER EVER EVER use the sa account.
|
|
|
|
|
Hi Guys Good Morning,
I have 3 Dataset like this,
First Dataset Records,
Code Value
1010 68.876
7887 189.89
456 1880.76
1010 223.978
Second Dataset Record
IV
7.88
Third Dataset Records,
Code Name IndCode
1010 Name1 1
7887 Name5 2
456 Name8 3
Now thses 3 dataset merge and i need the final dataset like this...,
Name finalValue Percent(finalvalue/IV)
Name1 292.854 37.16 (Code-1010,Value-68.876+223.978)
Name5 189.89 24.10 (code-7887,value-189.89)
Name8 1880.76 238.68 (code-456,Value-1880.76)
How to get the final dataset like this
Thanks & Regards,
Member 3879881,
please don't forget to vote on the post
|
|
|
|
|
I don't understand what you are trying to do but if you just require to achieve this, then follow these steps:
Add a Table to the new DataSet.
Add Columns to the Table.
Assign these columns to the corresponding columns. Something like
NewDataSetObject.Tables[0].Columns[0] = DataSet1.Tables[0].Columns[0];
I would rather recommend you to explain your scenario and answer these questions:
Where are these data coming from? Why have you taken one DataSet for 1 Table?
Why are you creating another DataSet when you can assign a DataSet, containing these Tables, as a DataSource ?
..Go Green..
|
|
|
|
|
Hi all,
I want to ignore negative while sorting a generic array list.
eg. If list contain following values
0.3
0.2
-0.3
after sofrting it should values should be in following order
0.3
-0.3
0.2
Any solution guyz.
Thanks in advance.
People Laugh on me Because i am Different but i Laugh on them
Because they all are same.
|
|
|
|
|
Write a class that implements IComparer .
public class myComparer : IComparer
{
public Boolean Descending;
#region IComparer Members
public int Compare(object x, object y)
{
Double obj1 = (Double)x;
if (obj1 < 0) obj1 = -(obj1);
Double obj2 = (Double)y;
if (obj2 < 0) obj2 = -(obj2);
if (Descending )
{
if (obj1 < obj2 )
return 1;
if (obj1 > obj2)
return -1;
}
else
{
if (obj1 > obj2 )
return 1;
if (obj1< obj2)
return -1;
}
return 0;
}
#endregion
}
Pass a object of your custom class in ArrayList.sort method
ArrayList arr = new ArrayList();
arr.Add(0.3);
arr.Add(0.2);
arr.Add(-0.3);
myComparer objComparer = new myComparer();
objComparer.Descending = true;
arr.Sort(objComparer);
modified on Monday, August 30, 2010 5:31 AM
|
|
|
|
|
you can do some thing like this
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
List<decimal> lstIntCol = new List<decimal>();
lstIntCol.Add(0.3M);
lstIntCol.Add(0.2M);
lstIntCol.Add(-0.3M);
lstIntCol.Sort(new decimalComparer());
foreach (decimal d in lstIntCol)
{
Response.Write(d.ToString() + "--");
}
}
}
public class decimalComparer : System.Collections.Generic.IComparer<decimal>
{
#region IComparer<decimal> Members
public int Compare(decimal x, decimal y)
{
return decimal.Compare(Math.Abs(y),Math.Abs(x));
}
#endregion
}
|
|
|
|
|
When i insert pdf file in database through OLEDB from c sharp asp dot net. and
retreive pdf through OLEDB from c sharp asp dot net then pdf show properly in browser
but when i insert pdf file sqlanywhere 11 database through OLE from power builder 12
and retreive pdf through OLEDB from c sharp asp dot net then pdf show error that
file does not begin with '%PDF-'.
PLEASE HELP ME AS SOON AS POSSIBLE REGARDING THIS MATTER
|
|
|
|
|
Tengo el mismo problema, encontraste la solución?
|
|
|
|
|
I use an access db with my website(.mdb file). I try to run 3 standard sql INSERT, DELETE and UPDATE statements. When I run the website locally on my computer it works great with no problems, but when I upload the website to the server and try to run the SQL statements I get 2 exceptions:
for the Insert statement:
System.Data.OleDb.OleDbException: Operation must use an updateable query.
for the Update statement:
Invalid SQL statement; expected 'DELETE', 'INSERT', 'PROCEDURE', 'SELECT', or 'UPDATE'.
for the DELETE statement:
System.Data.OleDb.OleDbException: Could not delete from specified tables.
I have to mention that the rest of the site works well with no special problems, including the pages where I read from the db tables by executing sql SELECT statements
|
|
|
|
|
benams wrote: I have to mention that the rest of the site works well with no special problems, including the pages where I read from the db tables by executing sql SELECT statements
It's seems you are having problem with the Writable operation as your "Read" operation working properly and "Insert", "Update", "Delete" is not working.
Please make sure that, In Web Server, you are having (In which credentials your application is running ) proper rights to write access on DB Server.
Hope this will helps !!
|
|
|
|
|
thanks for reply..
how can I check it? (I'm using flashfxp in order to access the server and upload the site's files)
|
|
|
|
|
can anyone guide me to get a asp.net job in UK.
|
|
|
|
|
Look here[^]
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Kindly avoid posting this kinda post in Programming forum. Might be you can try Lounge or so.
|
|
|
|
|
Hi Coders
I need to integrate paypal payment gateway in asp.net(C#). I want to use IPN method to get know the transactionId, payment status purpose.
I use sandbox account for this.I made the transaction successfully but it not give me IPN Message(querystring) which have complete detail like txn_id,status etc.I researched over it from last 3 days.
Do any provide a source code or sample application for this.
Thanks in advance
Amit
|
|
|
|