473,396 Members | 2,070 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

problem using javascript in .net

i have two problem

1. how to call a javascript function from form page and also how to call c# function from javascript because when user click on button i want to validate field of form and if validation is correct then call to c# function .
please any no about this reply

2. in second i have button when i click on button a calender shown and i collect date but problem is when i click on button i page reload , i want to stop reloading of page

in coding i set the value of calender visible true
please any body no about answer reply me
Aug 13 '08 #1
7 1783
joedeene
583 512MB
considering this is in the .net forum and you are referring to C# for part of the question, i'd suggest editing the title as this forum is for .net, just at least put something with c sharp in it rather than javascript
Aug 13 '08 #2
Curtis Rutland
3,256 Expert 2GB
Good catch. Please use descriptive titles when posting. It makes it easier for the experts to find the threads that they can help with, and if they can find it, they can help you

MODERATOR.
Aug 13 '08 #3
i have two problem

1. how to call a javascript function from form page and also how to call c# function from javascript because when user click on button i want to validate field of form and if validation is correct then call to c# function .
please any no about this reply

2. in second i have button when i click on button a calender shown and i collect date but problem is when i click on button i page reload , i want to stop reloading of page

in coding i set the value of calender visible true
please any body no about answer reply me
Aug 14 '08 #4
kenobewan
4,871 Expert 4TB
What have you tried so far?
Aug 14 '08 #5
Frinavale
9,735 Expert Mod 8TB
i have two problem

1. how to call a javascript function from form page and also how to call c# function from javascript because when user click on button i want to validate field of form and if validation is correct then call to c# function .
please any no about this reply

2. in second i have button when i click on button a calender shown and i collect date but problem is when i click on button i page reload , i want to stop reloading of page

in coding i set the value of calender visible true
please any body no about answer reply me
The article named how to check if a textbox contains a number contains information on how to use JavaScript in an asp.net application.

As for the validation, if your Server Code does the validation, you will need to do an Ajax call to the server. Consider using both server side and client side validation. Client side validation can be achieved by using controls like the RequiredFieldValidator, RegualarExpressionValidator, CustomValidator...etc.


As for your calendar issue.
The Calender requires a postback to the server (each date is actually a link button). To keep the Whole page from updating place the calendar control into an UpdatePanel. The update panel will do an asynchronous call to the server and only that section of the page will be updated when the page is returned to the browser.

If you start using Ajax in your site it will become smoother, however the above mentioned article on how to include JavaScript into your page will have to be modified to use the ScriptManager in order to register your scripts...otherwise they will not work properly after a postback has occurred.

Use the MSDN Library to research the controls I've mentioned here...give it a try...and when you have more specific problems with implementation get back to us.

-Frinny
Aug 14 '08 #6
Frinavale
9,735 Expert Mod 8TB
Please do not Double Post your question.
I have merged your two threads since you have received help in both of them.

Take the time to look over the posting guidelines. Following these guidelines will get your question answered more quickly and easily.

-Moderator Frinny
Aug 14 '08 #7
Thanks every body help me .

now i decide to using ajax in my project
Aug 17 '08 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Aaron Prohaska | last post by:
I have just run into a problem where I have a page that posts back to itself to execute code, except when the page does the post back it somehow executes code that is in our home page for the site....
4
by: Yaron Cohen | last post by:
Hi, I would like to ask for you help. I have a page that contains few JS files (please see below). The problem is that sometimes one of the files is not loaded (I am using IE 5.5). I get...
1
by: Julius Mong | last post by:
Dear all, according to the ASV3 manual known problem section, to make an <a> execute some Javascript onclick: ...
3
by: sancha | last post by:
Hi, i am in a bit of a delima here. I need to submit an action through javascript so i used document.forms.action='/search.do?&submitaction=Add Minus' document.forms.submit(); since i am...
12
by: Jeff S | last post by:
In a VB.NET code behind module, I build a string for a link that points to a JavaScript function. The two lines of code below show what is relevant. PopupLink = "javascript:PopUpWindow(" &...
0
by: 42 | last post by:
I implemented a simple class inherited from Page to create a page template. It simply wraps some trivial html around the inherited page, and puts the inherited page into a form. The problem I...
3
by: Microsoft Newsgroups | last post by:
Hi all, I'm having an interesting problem with my IE Webcontrols. I'm using the toolbar and when I test it in my browser using "http://localhost/mysite", it works fine. Incidentally, I have...
6
by: ged | last post by:
Hi, i am a oo (c#) programmer, and have not used javascript for a while and i cant work out how javascript manages its references. Object References work for simple stuff, but once i have an...
2
by: sorobor | last post by:
dear sir .. i am using cakephp freamwork ..By the way i m begener in php and javascript .. My probs r bellow I made a javascript calender ..there is a close button ..when i press close button...
4
by: r_ahimsa_m | last post by:
Hello, I am learning WWW technologies in Linux. I created index.html file which I can browse with Firefox/Konqueror using URL localhost/~robert/rozgloszenia/index.html. The page looks fine but...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
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,...
0
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
tracyyun
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.