|
the following is my master-page:
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="UBG_Test.master.cs" Inherits="UBG_Test" %>
<!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">
<asp:Table ID="tbMaster" Width="795" runat="server" BorderColor="AliceBlue" CellSpacing="1" CellPadding="1" BorderWidth=1>
<asp:TableRow ID="trContent" Height=100% >
<asp:TableCell VerticalAlign="Top" BorderWidth=2 >
<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
</asp:TableCell>
<asp:TableCell Width="166px" Height="100%" BorderWidth=2 BackColor="blue" >
<asp:Table ID="ttt" Width=100% height="100%" BorderWidth=2 BackColor=green runat=server>
<asp:TableRow height="100%">
<asp:TableCell height="100%"><br /></asp:TableCell>
</asp:TableRow>
</asp:table>
</asp:TableCell>
</asp:TableRow>
</asp:Table>
</form>
</body>
</html>
I just want to the table (named "ttt") height automatic = content_page's height. It could work in firefox, but not in IE7, why?
thanks!
|
|
|
|
|
caiter wrote:
Its all about the DOCTYPE man. Just remove this tag from the page.
|
|
|
|
|
|
How to create and fill combobox in datagrid, in vb.nt 2005
plz help
|
|
|
|
|
There is no combo as such. Did you mean Autosuggest controls?
|
|
|
|
|
You can create a template column and add a dropdown control into it. You would need to use the pre-render event of the datagrid loop through each row and add the correct listitems to the dropdown.
Hope that helps.
Ben
|
|
|
|
|
Hello!
One of my ASP.NET projects uses DropDown boxes. When the selected index of a certain drop down box changes I want to popup a yes/no message box asking if you want to change that value. If they do then the dropdown changes if they do not then it goes back to what it was before they touched it.
I am having problems creating a client side script that would perform this function. I DO NOT want OK/CANCEL box.
Any help would be greatly appreciated!
EEP
|
|
|
|
|
I don't think that a yes/no box is on offer, unless you created a form to do it.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Your own Custom WebForm for Confirmation in a ShowModalDialog should provide help on this.
|
|
|
|
|
I suppose what you're doin is creating a confirmation for a value change. maybe you should use Javascript to create a Confirm(). Javascript is widely accepted for this especially client-side script-wise, but if you want something else, you can popup a new mini browser window to the user with the confirmation buttons.
|
|
|
|
|
chk it out..
http://michaelsync.net/2007/01/01/custom-javascript-dialog/
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
The tblHoliday has two columns. The Name and the Key ID.
timeCardDataSet.tblHoliday.NewtblHolidayRow();<br />
holidayRow.Name = "Name";<br />
timeCardDataSet.tblHoliday.AddtblHolidayRow(holidayRow);
How can I get the value of the (from Access) generated key.
|
|
|
|
|
Are you getting the key from the database? If so, you can use an OleDB Connection, and OleDBCommand object, a connection string, a SELECT statement, and you can use the ExecuteScalar to retrieve the Key.
|
|
|
|
|
Give me an example please
|
|
|
|
|
string cmdstr="SELECT Field1 FROM tablename where Field2 = @strField2";
string cons = ; //Look up Connection Strings for Access MDB
con=new OleDbConnection(cons);
cmd=new OleDbCommand(cmdstr,con);
cmd.Parameters.AddWithValue("@strField2",strField2);
con.Open();
string myKey = cmd.ExecuteScalar().ToString();
|
|
|
|
|
|
Why is it that at least one person a day can't think of a better subject line than 'ASP.NET' ???
I don't think the datagrid supports inline edit, does it ? You can add buttons to a datagrid's rows and have them call code to do whatever you like, or is how to use Access what you really need help with ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I'm still trying to figure out how these people can type here but can't use Google.
______________________
stuff + cats = awesome
|
|
|
|
|
leckey wrote: I'm still trying to figure out how these people can type here but can't use Google.
Because the interface in google is soooo confusing.
|
|
|
|
|
I like to copy the question into google verbatim, and provide a link to the result, if the result has lots of good hits ( as it often does )
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
|
Please read the forum guidelines. Highlights include:
1. Do not just name your message title the name of board. That gives us no clue to what you need help with.
2. Also, do not use words like 'urgent' or 'help.'
3. This site is really for people who are having trouble with code they have written. A google search on your topic would bring you thousands or results. Basically, do your own work, but if you get stuck, feel free to ask.
______________________
stuff + cats = awesome
|
|
|
|
|
Hi.How the songs are playing,suppose one client is selecting a song it will go to server and open the audio file from server or some other way.will it add to playlist or not.how that particular song is playing.while selecting a song will keep anyware that song or how it is.how we can do this very fastly.
|
|
|
|
|
Hey guys,
I was wondering if anyone would be able to give me a good guide, or even some tips on a good date/time picker for ASP.NET 2.0.
Right now I have text boxes which are pretty simple (and annoying) to enter data into. All it is is "YYYY/MM/DD" with a lock on the characters to 10 and "HH:MM AM" for the time. They are pretty simple and don't really protect against any type of misentry.
I was thinking of having three drop down list boxes for the date (Year, Month, Day) and three more for the time (Hour, Minute, AM/PM). I can only really think of one problem with that, which is if someone mistakingly picks Feburary 31st, etc.
The data from these fields would be going into a SQL database, so I'd like to try to prevent all possible errors on the user side of things.
The best I've come across from Googling was this http://www.codeproject.com/useritems/DateAndTimePicker.asp
If anyone can recommend this, or anything else that'd be great.
EDIT: I forgot to mention, I'm programming is VB.NET, if that matters.
Thanks,
aqzman
|
|
|
|
|
Three dropdowns:
<asp:dropdownlist id="lstDay" Runat="server"></asp:dropdownlist>-
<asp:dropdownlist id="lstMonth" Runat="server">
<asp:ListItem Value="Jan">Jan</asp:ListItem>
<asp:ListItem value="Feb">Feb</asp:ListItem>
<asp:ListItem value="Mar">Mar</asp:ListItem>
<asp:ListItem value="Apr">Apr</asp:ListItem>
<asp:ListItem value="May">May</asp:ListItem>
<asp:ListItem value="Jun">Jun</asp:ListItem>
<asp:ListItem value="Jul">Jul</asp:ListItem>
<asp:ListItem value="Aug">Aug</asp:ListItem>
<asp:ListItem value="Sep">Sep</asp:ListItem>
<asp:ListItem value="Oct">Oct</asp:ListItem>
<asp:ListItem value="Nov">Nov</asp:ListItem>
<asp:ListItem value="Dec">Dec</asp:ListItem>
</asp:dropdownlist>-
<asp:dropdownlist id="lstYear" Runat="server"></asp:dropdownlist>
some javascript funcitons:
function daysInMonth(x,ty) {
if (x==3 || x==5 || x==8 || x==10) {
return 30;
} else if (x==1) {
if ((ty % 4 == 0) && !(ty % 100 == 0)) {
return 29;
} else {
return 28;
}
} else {
return 31;
}
}
function setday() {
var list1 = document.getElementById("lstYear");
var list2 = document.getElementById("lstMonth");
var list3 = document.getElementById("lstDay");
var yy = list1.selectedIndex + 2000;
var cd = list3.selectedIndex + 1; // because selectedIndex is from 0 to (up to) 30
var NumberOfDays;
var n;
NumberOfDays = daysInMonth(list2.selectedIndex, yy);
list3.options.length=0;
for (n=0;n<NumberOfDays;n++) {
list3.options[n] = new Option((n+1).toString(),(n+1).toString());
}
if (cd > NumberOfDays || cd == 0) {
list3.options[dt-1].selected = true;
} else {
list3.options[cd-1].selected = true;
}
}
function leapYear() {
var list2 = document.getElementById("lstMonth");
if (list2.selectedIndex == 1) {setday();}
}
and some code-behind to intialise the boxes (call in Page_load under an If Not Page.IsPostback then...:
(NB this example initialises them to "yesterday" - set yd = Now for "today")
Private Sub InitDropdowns()
Dim y As Integer, li As ListItem
Dim yd As Date = DateAdd(DateInterval.Day, -1, Now)
For y = 2000 To Year(Now)
li = New ListItem
li.Value = y.ToString
li.Text = y.ToString
lstYear.Items.Add(li)
li = Nothing
Next
For y = 1 To DaysInMonth(Month(yd), Year(yd))
li = New ListItem
li.Value = y.ToString
li.Text = y.ToString
lstDay.Items.Add(li)
li = Nothing
Next
lstDay.SelectedValue = Day(yd)
lstMonth.SelectedValue = Microsoft.VisualBasic.MonthName(Month(yd), True)
lstYear.SelectedValue = Year(yd)
lstMonth.Attributes.Add("onchange", "setday()")
lstYear.Attributes.Add("onchange", "leapYear()")
End Sub
Private Function DaysInMonth(ByVal x As Integer, ByVal ty As Integer) As Integer
Select Case x
Case 2
If (ty Mod 4 = 0) And (ty Mod 100 = 0) Then
Return 29
Else
Return 28
End If
Case 4, 6, 9, 11
Return 30
Case Else
Return 31
End Select
End Function
You can then read the selected date on postback with:
Dim d As Date = CDate(lstDay.SelectedValue & "-" & lstMonth.SelectedValue & "-" & lstYear.SelectedValue)
works a treat - good luck!
Fred
|
|
|
|