|
-
Oct 19th, 2007, 09:30 AM
#1
Thread Starter
Fanatic Member
Resolved[02/03] web user control calendar
I recently added a web user calendar control that I made from a textbox , an input button, an html div and a calendar tool to my webpage and realized to my chagrin that I can't move it from the left side of the page it is essentially locked once I drag and drop this from the solution explorer. Is there any way to unlock a web user control so that it can be placed where you wish to drag and drop it ?
Last edited by Christopher_Arm; Oct 24th, 2007 at 08:52 AM.
-
Oct 19th, 2007, 01:37 PM
#2
Re: [02/03] web user control calendar
You could just go into the HTML source of the page and place it inside another DIV which is right aligned. Dragging and dropping is for absolute positioning but you're obviously not using that on your page.
-
Oct 19th, 2007, 02:14 PM
#3
Thread Starter
Fanatic Member
Resolved [02/03] web user control calendar
I am one step ahead of you Mendhak..I did exactly as you said some hours before..however..within the code of my html it invokes this function
Code:
<script>
in the script tags:
function OnClick
{
if (divCalendar.style.display == "none")
divCalendar.style.display = "";
else
divCalendar.style.display = "none";
}
</script>
In the code behind:
Private Sub Calendar1_SelectionChanged1(ByVal sender As Object, ByVal e As System.EventArgs) Handles Calendar1.SelectionChanged
TextBox14.Text = Calendar1.SelectedDate.ToShortDateString
Dim div As System.Web.UI.Control = Page.FindControl("divCalendar")
If TypeOf div Is HtmlGenericControl Then
CType(div, HtmlGenericControl).Style.Add("display", "none")
End If
End Sub
Is there any way around this line of code or to be more precise..is there a way to incorporate similar logic to make the calendar vanish once the selection has been made since I do not have a div/label and it doesn't seem to work when I put it around my calendar control.
EDIT: I figured this out. There was no need to go around this bit of logic. It works well enough. Figuring out how to autocalc the date in textboxes setting the following textboxes to 30 and 60 days in advance with javascript with the OnBlur method which you mentioned in a previous thread earlier. Except for www.w3schools.com I don't see many references on that subject and that has proven to be a harder problem in solving.
Last edited by Christopher_Arm; Oct 24th, 2007 at 08:52 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|