Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Professional
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 19th, 2006, 03:00 AM
Registered User
 
Join Date: Dec 2006
Location: , , India.
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default Error while running javascript code in ASP.NET Pag

Hi,
I m trying to run a client side code written in javascript to display a calender, which displays selected date in a html textbox control in asp.net web page. Now i wanna use that date in my query to fetch records from database on html button control click but it is giving error "Error on Page".

If i m using an asp button control then it wants "runat= server" on form tag, but if specifying that then javascript could not able to find that form to display calender.

Please help me if anyone can its urgent.Thanx in advance

  #2 (permalink)  
Old December 19th, 2006, 09:07 AM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

In your code behind do this:

button.attributes.add("onClick", "[javascript function]")

-------------------------
I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.

^^Thats my signature
  #3 (permalink)  
Old December 20th, 2006, 03:39 AM
Registered User
 
Join Date: Dec 2006
Location: , , India.
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi dparson
Thanx for reply
But actlly u r not getting wat i wanna do.
In my project i m using a javascript file through which two calenders r displayed successfully on my page n selected date is displayed on textboxes "firstinput" and "secondinput" .Now i wanna use that value in my query and on button click i m writing the code specified below:
"Dim cn As New OleDb.OleDbConnection
        cn.ConnectionString = ConfigurationSettings.AppSettings("Accesscon").ToS tring + Server.MapPath("contactus.mdb")
        cn.Open()
        Dim cmd As New OleDb.OleDbCommand
        Dim str As String
        'str = " select Sno from contact where date between ( #" & firstinput.Value & " #) and ( # " & secondinput.Value & " # )"
        'Session("string") = str
        Response.Redirect("searchresult.aspx")
        cn.Close()"
The button is a html control and it is giving error "Error on Page" and sometimes it is giving error "_dopostback(onclick('Button',''))"
now pleeez tell me wat to do.

 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
who help me?(asp.net 2.0 running error) fuyingwei ASP.NET 2.0 Basics 2 October 8th, 2008 11:27 AM
Error code: Chapter 17 Pag 576 luisxvarg BOOK: Beginning Visual Basic 2005 ISBN: 978-0-7645-7401-6 1 October 15th, 2007 08:06 PM
Running a Javascript form in ASP.NET:problem Nostromo77 ASP.NET 2.0 Basics 2 February 5th, 2007 09:01 PM
"Server not running ASP.NET 1.1" error message arashj General .NET 1 September 7th, 2004 05:49 AM
ASP.Net: Running 1.1 but getting an error from 1.0 andrewba ASP.NET 1.0 and 1.1 Basics 3 August 9th, 2004 04:05 AM



All times are GMT -4. The time now is 06:48 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.