|
Dear Friends,
Could any of u tell me, how to restrict copying and pasting of text into an Number restricted field.?
Say, I have a text box which should accept only Amount..
So,I have restricted text entry to that text box,by javascript.
But,a block of text is copied and pasted into that field.
Thus tell me how I could avoid this?
Thanks a lot.
Muthu
|
|
|
|
|
I don't think this can be done easily. What you could do though is handle the JavaScript onchange event for your INPUT control and prevent the user from navigating away from the control if it contains non-numeric input. Follow this link[^] for an example of a function that checks whether a string is numeric. If the string is not numeric, cancel the onchange event.
Paul Marfleet
|
|
|
|
|
Here is the situation
I have a web page where I use the following code for prepopulate dates into two text boxes(in Page_Load event),
If Not IsPostBack Then
Me.DateFromTextBox.Text = System.DateTime.Now.AddDays(-15).ToShortDateString
Me.DateToTextBox.Text = System.DateTime.Now.ToShortDateString
End If
Now I have a date picker icon next to each text box and the user selects the date by clicking the icon(another aspx page opens, usual java script date picker stuff),
<asp:textbox autopostback="true" id="DateFromTextBox" width="90" readonly="true" runat="server"></asp:textbox><a href="javascript:;" onclick="calendarPicker('DateFromTextBox');" title="Pick Date from Calendar"> <img alt="Pick" src="calendar_icon.png" width="20" height="20" style="border-width:thin"/></a>
<script language="javascript" type="text/javascript">
function calendarPicker(strField)
{
window.open('DatePicker.aspx?field=' + strField, 'calendarPopup', 'width=250,height=250,resizable=no');
}
</script>
Now I am not able to capture these values selected using datepicker, If the user enters the date without selecting from datpicker I am able to capture the values properly,
No matter what I do I am not able to capture the dates picked using date picker, am I missing anything here
Thanks in advance, Appreciate any help
Sri
|
|
|
|
|
I don't know how to get values from another page.
However, instead of another page, you might want to check out AJAX calendar extender at www.asp.net/ajax.
I just added it to my page, and it works well.
"Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit..."
"There is no one who loves pain itself, who seeks after it and wants to have it, simply because it is pain..."
|
|
|
|
|
Try it without the readonly="true" property of the textboxes and see if that works...
|
|
|
|
|
Hi,
Which version are you using? If you are using .net 2.0 then probably you may use CalenderControl which comes with .Net. That serves your purpose I feel. But the thing is the control do not pops up in a different window, instead it gets visible in the same page. Its really good control with lot of readymade functionality.
hope this works for you.
Regards,
Rakesh
Rakesh
|
|
|
|
|
HI,
we have a web service and our application(.net 1.1, C#, oracle) consumes this web service. By default the security(authentication) is given anonymous, now as for security reasons we want to remove this option.
So lets say we use Integrated Windows Authentication. Doing so we would get Access Denied 401 error. On searching though it is found that we could pass few credentials and access the web service (this works fine)
What are the cons in providing user credentials in the code?
What are the steps to be followed to make a web service secure and accessible?
Is there a way that a web service can be accessed after removing anonymous access and not providing any credentials in the code?
Thanks a ton!
gauthee
|
|
|
|
|
|
|
I've heard this is a good book too - I will check it out, thank you!
Coleen
NV DMV ISS 3
|
|
|
|
|
am not getting the popup window when am clicking an image button.the code as follows
am getting image in this button,but when clicking it is not going to the given page.
<asp:imagebutton id="imgPhoto" runat="server" height="100px" imageurl="<%# FormatUrl(DataBinder.Eval(Container, "DataItem.MEMBERID")) %>" postbackurl="javascript:window.showModalDialog('~/MemberDetails.aspx','','help:no');">
|
|
|
|
|
Kurian_Kurian wrote: the code as follows
I don't see any code. If you are posting markup code, use the "Ignore HTML" option.
---
single minded; short sighted; long gone;
|
|
|
|
|
in web page i create word document. i referenced to MSWord.olb file. But there is no Bin directory, there is no any delegate as it is automaticaly created when you referance to dll file.
my site works on local machine, it creates word documants.
but at server, i got error :S
how could i solvE?
|
|
|
|
|
Hello,
I'm thinking about two solutions:
1. Try to call MS Word using late binding.
2. Ty to use Aspose.Word library
|
|
|
|
|
hi
i m devloping a web application
and i m passing a parameter i.e empid through query i.e command text
i m getting error that parameter not found
pankaj sahni
|
|
|
|
|
I have a user control specified in an aspx page thus:
<CAS:BodyBox runat="server" TitleImage="../Style/Users_small.gif" Width="800">
<Title>
Welcome to <strong>Caslon</strong>
</Title>
<Content>
<CAS:Welcome runat="server" />
</Content>
</CAS:BodyBox>
I get parsing errors
Validation (XHTML 1.0 Transitional): The element 'Title' cannot be nested within the element 'bodybox'.
such that I cannot view the page in design view.
What is the correct way to write this snippet?
BTW, I did not author this code, I have merely been tasked with trying to understand it.
Kevin
|
|
|
|
|
I have put my web-site together and everything works fine when working on my computer. I have one page that works with a Visual FoxPro table (dbf). In my web.config file, the only way to get it to find the table is to put in the complete path to the file. The file on my site is located in the App_Data folder off of the root. Here is the connection string that works on my local computer when running under Visual Web Developer:
<connectionstrings>
<add name="ADAInfoConnectionString"
connectionstring="Provider=VFPOLEDB.1;Data Source='C:\Users\David\Documents\Visual Studio 2005\WebSites\Damar\App_Data\ADASurvey.dbf'"
providername="System.Data.OleDb">
How can I get my ASP.Net application to find this table on my web-site? Should I use information in the web.config file or is there another approach that will work?
Any help would be much appreciated.
Thanks!
Dave
|
|
|
|
|
Hello,
You can use Server.MapPath("App_Data\ADASurvey.dbf"); This method maps the specified relative or virtual path to the physical directory on the server.
|
|
|
|
|
Ilya,
Can I use this in my web.config file or do I need to do something in my page load event?
Dave
|
|
|
|
|
You should manage this in load event.
|
|
|
|
|
Hi all,
I am making one web application using ASP.NET and VB.NET 2.0. I want to make alerts and reminders for this application. User can set reminder for some specific date and they get mail as a reminder on that. Plus one day every week system check for users if they fill one form or not. If not then they will get mail to alert it. Can I know how I can do this? I am using SQL Server 2000 as a database.
Thanks in advance,
Priyank
|
|
|
|
|
Hi,
I think that you can use two solutions. First, you can create windows service which will do something automatically. In another way, you can create simple tool which will send e-mails and configure Windows "Schedule Task" to run it.
You can send e-mails using .NET Framework. But you also can create stored procedure for SQL Server fo e-mail sending. How to do this see here. If you will do this using SQL Server only, you can run this stired procedure using osql.exe in BAT-files.
|
|
|
|
|
Hi,
I want to create a popup calendar in .aspx page using javascript.
Can some one send and explain the code step by step.
Thanks,
Montu
Hello There
|
|
|
|
|
Sure,
Step 1) Open Internet browser of your choice
Step 2) Type www.google.com into address bar
Step 3) Press enter button
Step 4) Type javascript calandar into search box
Step 5) Click Search button
Step 6) Read
only two letters away from being an asset
|
|
|
|
|
http://www.asp.net/learn/ajax-videos/[^]
"Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit..."
"There is no one who loves pain itself, who seeks after it and wants to have it, simply because it is pain..."
|
|
|
|