Originally posted by lambrini_socialist
View Post
- Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
- Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!
Reply to: ASP Experts!
Collapse
You are not logged in or you do not have permission to access this page. This could be due to one of several reasons:
- You are not logged in. If you are already registered, fill in the form below to log in, or follow the "Sign Up" link to register a new account.
- You may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
- If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.
Logging in...
Previously on "ASP Experts!"
Collapse
-
-
Originally posted by lambrini_socialist View Postfor stuff like this i often put the control inside a div or span or whatever, and toggle the visibility using javascript. no postbacks, popups or ajax required and it's dead easy: http://blog.movalog.com/a/javascript-toggle-visibility/
QB.
Leave a comment:
-
for stuff like this i often put the control inside a div or span or whatever, and toggle the visibility using javascript. no postbacks, popups or ajax required and it's dead easy: http://blog.movalog.com/a/javascript-toggle-visibility/
Leave a comment:
-
Originally posted by HankWangford View Postbut doing a postback just to show a calendar.......
I would use the jquery datepicker, all clientside and much slicker
No postback involved.
Leave a comment:
-
Originally posted by themistry View PostIts ASP.NET!!!!
Glad you solved your problem.
TM
I would use the jquery datepicker, all clientside and much slicker
Leave a comment:
-
Should have added:
So much for this not being a proper technical forum
Leave a comment:
-
Originally posted by TheRefactornator View PostMost of the useful stuff can't be done with ASP.NET out of the box, but there's always a way and usually someone has already done it before you
Googled:
http://www.devx.com/vb2themax/Tip/18850
I would have prefered divs but i'm happy with a new window popping up for now.
That method was for ASP 1.0, took a bit of fiddling with to get it working in ASP 2 but the methods are still sound.
Interestingly, setting the onclick method for a dynamic button does work for client side scripts, just not server side scripts.
mycalendarButton.Attributes("OnClick") = "calendarButton_Click()"
Thanks for that, much appreciated!Last edited by Spacecadet; 28 April 2008, 08:05.
Leave a comment:
-
Originally posted by QwertyBerty View PostThe button click is not raising the calendarButton_Click() event. Adding a static button and calling calendarButton_Click() explicitly does make the calendar visible.
QB.
It is dynamic after all
Leave a comment:
-
Originally posted by NickFitz View PostIt's been quite a while since I played with ASP.NET (!= ASP, btw ) but might theCode:AutoEventWireup="false"
Leave a comment:
-
The button click is not raising the calendarButton_Click() event. Adding a static button and calling calendarButton_Click() explicitly does make the calendar visible.
QB.
Leave a comment:
-
Most of the useful stuff can't be done with ASP.NET out of the box, but there's always a way and usually someone has already done it before you
Googled:
http://www.devx.com/vb2themax/Tip/18850
Leave a comment:
-
It's been quite a while since I played with ASP.NET (!= ASP, btw ) but might theCode:AutoEventWireup="false"
Not relevant to your issue, but why couldn't Microsoft have used standard Processing Instructions, which were intended for precisely that purpose?
Oh, I forgot, Microsoft make their own "standards"
Leave a comment:
-
ASP Experts!
I'm building a process for creating a dynamic form in ASP VB. I can easily create text boxes, drop down lists, multi select lists etc...
One thing I can't seem to do though is dynamically create a calendar control and make it "pop up" on request.
I've pulled out some code to try and isolate what the code is supposed to achieve.
Hitting the "..." button should make the calendar control visible. Only it doesn't
Heres some example code:
Code:<%@ Page Language="VB" AutoEventWireup="false" CodeFile="calendarTest.aspx.vb" Inherits="calendarTest" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>Untitled Page</title> </head> <body> <form id="form1" runat="server"> <div> <asp:PlaceHolder ID="mycalendarPlaceholder" runat="server"></asp:PlaceHolder> <br /> <asp:Literal ID="Literal1" runat="server"></asp:Literal></div> </form> </body> </html>
Code:Partial Class calendarTest Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim mycalendarTextbox As New TextBox() Dim mycalendarButton As New Button() Dim mycalendar As New Calendar mycalendar.ID = "calendar1" mycalendar.Visible = False mycalendarTextbox.ID = "Cal1" mycalendarTextbox.Text = CType(System.DateTime.Now, String) mycalendarButton.ID = "calendarButton" mycalendarButton.Text = "..." mycalendarButton.Attributes("OnClick") = "calendarButton_Click()" mycalendarPlaceholder.Controls.Add(mycalendarTextbox) mycalendarPlaceholder.Controls.Add(mycalendarButton) mycalendarPlaceholder.Controls.Add(mycalendar) End Sub Protected Sub calendarButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Dim mc As Calendar = CType(form1.FindControl("calendar1"), Calendar) mc.Visible = True ' mycalendarPlaceholder.Controls.Add(mc) Literal1.Text = Literal1.Text + "test1" End Sub End Class
Tags: None
- Home
- News & Features
- First Timers
- IR35 / S660 / BN66
- Employee Benefit Trusts
- Agency Workers Regulations
- MSC Legislation
- Limited Companies
- Dividends
- Umbrella Company
- VAT / Flat Rate VAT
- Job News & Guides
- Money News & Guides
- Guide to Contracts
- Successful Contracting
- Contracting Overseas
- Contractor Calculators
- MVL
- Contractor Expenses
Advertisers
Contractor Services
CUK News
- Streamline Your Retirement with iSIPP: A Solution for Contractor Pensions Sep 1 09:13
- Making the most of pension lump sums: overview for contractors Sep 1 08:36
- Umbrella company tribunal cases are opening up; are your wages subject to unlawful deductions, too? Aug 31 08:38
- Contractors, relabelling 'labour' as 'services' to appear 'fully contracted out' won't dupe IR35 inspectors Aug 31 08:30
- How often does HMRC check tax returns? Aug 30 08:27
- Work-life balance as an IT contractor: 5 top tips from a tech recruiter Aug 30 08:20
- Autumn Statement 2023 tipped to prioritise mental health, in a boost for UK workplaces Aug 29 08:33
- Final reminder for contractors to respond to the umbrella consultation (closing today) Aug 29 08:09
- Top 5 most in demand cyber security contract roles Aug 25 08:38
- Changes to the right to request flexible working are incoming, but how will contractors be affected? Aug 24 08:25
Leave a comment: