|
No none of the parents is invisible because when this code is not inserted the whole page appears normally
|
|
|
|
|
Have you tried the Java forumn?
Excellence is doing ordinary things extraordinarily well.
|
|
|
|
|
i did not understand your question you mean have i tried to use form in java script or discussion forms in js
|
|
|
|
|
Is your problem solved.Register javascript mathod using Page.ClientScript.RegisterStartupScript
and if you using scriptmanager on the page then use this mathod
ScriptManager.RegisterStartupScript
Cheers!!
Brij
|
|
|
|
|
it worked in getting the value of text box but when it came to focus method it gave an error
|
|
|
|
|
There may be certain things
First check whether your code below is able to get the object of control document.getElementById('"+txt.Text+"')
your Textbox is server side or clientside control?
Cheers!!
Brij
|
|
|
|
|
It is a server side but txt.Text is assigned to have this value TEXTBOX.ClienID
|
|
|
|
|
Hello,
I have developed an application which reads from, writes to xml files and displays the data on the UI.
This application is used by many users and so an auditing functionality is required.
How do you recommend to do this? should the audit be written into a separate centralized xml file? remember that this audit file will have to be used to retrieve data to show the audit details.
Thanks
|
|
|
|
|
Hi,
I would suggest using a database instead of xml. Advantage of this approach is, that it is faster than xml, supports multi-threading and user-isolation and provides functionalities to analyse the data within. Using Xml means that you have to implement this all by yourself. Working with xml is slow so this can become a bottleneck for your application.
Regards
Sebastian
|
|
|
|
|
Hi,
Due to business rules, database should not be used.
Thanks
|
|
|
|
|
You need to raise with your business that this rule will cost a lot of money to work around, and does not gel with an audit requirement functionality because of the lack of transactional constraints in your XML handling.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
|
Hi..
i m using try command like this
try
{
// Statement which can cause an exception.
}
catch
{
// Statements for handling the exception
}
when perform catch statement then progrm not read next line go to try statement which can cause an exception
how can i do???
|
|
|
|
|
mjawadkhatri wrote: when perform catch statement then progrm not read next line go to try statement which can cause an exception
how can i do???
Can you explain a bit better what your asking?
Your program will execute the code within the try block, if an error occurs it will 'jump' to the catch block and execute the code there. It will not return to the try block.
If there is any code you always need/want to be executed use a 'finally' block.
|
|
|
|
|
I saw your Example code in Coding Horrors lol
I dont know what your problem is but its not done that way, what is the is of using the catch keywork and not use it.
try
{
}
catch(ApplicationExeption ex)
{
}
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.somee.com
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Not sure what it is you want, however:
1.
there is no simple equivalent to ancient Basic's "On Error Goto Next"
2.
if your try block contains a loop, and fails in one iteration of said loop, anything in the try block is aborted, also the loop.
if you want the loop to continue with the next iteration, you have to turn things around, and put the try-catch construct inside the loop.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
I am having trouble working out how i can make a beep occur for a given duration of time.
I have the following event handler that will recieve the beep duration and execute it for that amount of time. Lots of articles talk of beeping for intervals but have not found a way to make a continuous beep.
void VMCU_Beep(int BeepDurationInSeconds)
{
}
Does anyone know how this can be done
Thanx George
|
|
|
|
|
Use System.Console.Beep(frequency, duration)
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
Thanx thats what i was looking for
|
|
|
|
|
gwithey wrote: a continuous beep
trying to keep the mosquitoes away?
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
The GridView columns are as follow:
<Columns>
<asp:BoundField HeaderText="ID No." DataField="NRIC" />
<asp:BoundField HeaderText="Name" DataField="LabourName" />
<asp:BoundField HeaderText="Event Name/Duty Roster" DataField="EventName/DutyRoster" />
<asp:BoundField HeaderText="Working Date" DataField="WorkingDate" />
<asp:BoundField HeaderText="Normal(hr)" DataField="NormalHour" />
<asp:BoundField HeaderText="Amt(N)" DataField="NormalRate" />
<asp:BoundField HeaderText="Extra(hr)" DataField="ExtraHour" />
<asp:BoundField HeaderText="Amt(E)" DataField="ExtraRate" />
<asp:BoundField HeaderText="Weekend(hr)" DataField="WeekEndHour" />
<asp:BoundField HeaderText="Amt(W)" DataField="WeekEndRate" />
<asp:BoundField HeaderText="Holiday(hr)" DataField="HolidayHour" />
<asp:BoundField HeaderText="Amt(H)" DataField="HolidayRate" />
<asp:BoundField HeaderText="Allowance" DataField="Allowance" />
<asp:BoundField HeaderText="Total $" DataField="Total" />
<asp:BoundField DataField="Type" HeaderText="Type" Visible="False" />
</Columns>
The result must be:
------------|-------|---------------|-----------------|--------------|--------|---|------
LabourID|Name|Event Name|Working Date|Normal(Hr)|Amt(N)|...|Total
------------|-------|---------------|-----------------|--------------|--------|---|------
009 |ET | All | All | 5 | 35.0 |...|95.0
------------|-------|---------------|-----------------|--------------|--------|---|------
| | Meeting | 10 Jul 09 | 2 | 20.0 |...|60.0
------------|-------|---------------|-----------------|--------------|--------|---|------
| | Seminar | 13 Jul 09 | 3 | 15.0 |...|35.0
------------|-------|---------------|-----------------|--------------|--------|---|------
002 |Sue | All | All | 6 | 18.0 |...|40.0
------------|-------|---------------|-----------------|--------------|--------|---|------
| | Promotion | 23 Jul 09 | 6 | 18.0 |...|40.0
------------|-------|---------------|-----------------|--------------|--------|---|------
I'm writing the code as follow:
void GetDataTable(DataTable tempDT)
{
DataTable dt_FromDB = tempDT;
DataTable dt_Grid = Grid_Table;
// DataRow adr = new DataRow();
decimal nHour=0;
decimal nRate=0;
decimal eHour=0;
decimal eRate=0;
decimal hHour=0;
decimal hRate=0;
decimal wHour=0;
decimal wRate=0;
decimal allow=0;
decimal total=0;
string labourNRIC = "";
string checkLabourNRIC = "";
foreach (DataRow dr_FromDB in dt_FromDB.Rows)
{
//string NRIC=dr_FromDB["NRIC"].ToString();
//while(dt_FromDB.Select("NRIC="+NRIC))
//{
if(dr_FromDB["NRIC"].ToString()==labourNRIC || labourNRIC=="")
{
nHour += Convert.ToDecimal(dr_FromDB["NormalHour"].ToString());
nRate += Convert.ToDecimal(dr_FromDB["NormalRate"].ToString());
eHour += Convert.ToDecimal(dr_FromDB["ExtraHour"].ToString());
eRate += Convert.ToDecimal(dr_FromDB["ExtraRate"].ToString());
hHour += Convert.ToDecimal(dr_FromDB["HolidayHour"].ToString());
hRate += Convert.ToDecimal(dr_FromDB["HolidayRate"].ToString());
wHour += Convert.ToDecimal(dr_FromDB["WeekEndHour"].ToString());
wRate += Convert.ToDecimal(dr_FromDB["WeekEndRate"].ToString());
allow += Convert.ToDecimal(dr_FromDB["Allowance"].ToString());
total += Convert.ToDecimal(dr_FromDB["Total"].ToString());
}
if (dr_FromDB["NRIC"].ToString() != checkLabourNRIC)
{
labourNRIC = dr_FromDB["NRIC"].ToString();
DataRow dr_Grid = dt_Grid.NewRow();
dr_Grid["NRIC"] = dr_FromDB["NRIC"].ToString();
dr_Grid["LabourName"] = dr_FromDB["LabourName"].ToString();
dr_Grid["EventNameOrDutyRoster"] = "All";
dr_Grid["WorkingDate"] = "All";
dr_Grid["NormalHour"] = nHour;
dr_Grid["NormalRate"] = nRate;
dr_Grid["ExtraHour"] = eHour;
dr_Grid["ExtraRate"] = eRate;
dr_Grid["HolidayHour"] = hHour;
dr_Grid["HolidayRate"] = hRate;
dr_Grid["WeekEndHour"] = wHour;
dr_Grid["WeekEndRate"] = wRate;
dr_Grid["Allowance"] = allow;
dr_Grid["Total"] = total;
dt_Grid.Rows.Add(dr_Grid);
ViewState["Grid"] = dt_Grid;
}
if (dr_FromDB["NRIC"].ToString() == labourNRIC)
{
DataRow dr_Grid = dt_Grid.NewRow();
dr_Grid["EventNameOrDutyRoster"] = dr_FromDB["EventNameOrDutyRoster"].ToString();
dr_Grid["WorkingDate"] = dr_FromDB["WorkingDate"].ToString();
dr_Grid["NormalHour"] = dr_FromDB["NormalHour"].ToString();
dr_Grid["NormalRate"] = dr_FromDB["NormalRate"].ToString();
dr_Grid["ExtraHour"] = dr_FromDB["ExtraHour"].ToString();
dr_Grid["ExtraRate"] = dr_FromDB["ExtraRate"].ToString();
dr_Grid["HolidayHour"] = dr_FromDB["HolidayHour"].ToString();
dr_Grid["HolidayRate"] = dr_FromDB["HolidayRate"].ToString();
dr_Grid["WeekEndHour"] = dr_FromDB["WeekEndHour"].ToString();
dr_Grid["WeekEndRate"] = dr_FromDB["WeekEndRate"].ToString();
dr_Grid["Allowance"] = dr_FromDB["Allowance"].ToString();
dr_Grid["Total"] = dr_FromDB["Total"].ToString();
dr_Grid["Type"] = dr_FromDB["Type"].ToString();
dt_Grid.Rows.Add(dr_Grid);
ViewState["Grid"] = dt_Grid;
checkLabourNRIC = labourNRIC;
}
}
*How shall I continue this code?
*Thanks for your help.
Su
|
|
|
|
|
For the love of God, tag your code so that its pretty:
------------|-------|---------------|-----------------|--------------|--------|---|------
LabourID |Name |Event Name |Working Date |Normal(Hr) |Amt(N) |...|Total
------------|-------|---------------|-----------------|--------------|--------|---|------
009 |ET | All | All | 5 | 35.0 |...|95.0
------------|-------|---------------|-----------------|--------------|--------|---|------
| | Meeting | 10 Jul 09 | 2 | 20.0 |...|60.0
------------|-------|---------------|-----------------|--------------|--------|---|------
| | Seminar | 13 Jul 09 | 3 | 15.0 |...|35.0
------------|-------|---------------|-----------------|--------------|--------|---|------
002 |Sue | All | All | 6 | 18.0 |...|40.0
------------|-------|---------------|-----------------|--------------|--------|---|------
| | Promotion | 23 Jul 09 | 6 | 18.0 |...|40.0
------------|-------|---------------|-----------------|--------------|--------|---|------
Then we can think about the problem.
The solution is not too hard and you needn't have posted 18 billion lines of code.
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
Can u give me solution? I need to accomplish it. Thanks.
|
|
|
|
|
I can give the solution but you'll learn morew by trying. However I've been told I'm too rude to everyone so, for _Maxx_'s benefit, I will point you gently in the right direction.
The problem is complicated by having the summary before the items, but there is an easy way to do this that does not require looping through the items twice. The follwoing psudo code should get you on your way:
summary is not set
for each item in the list
if the item key <> summary key
if the summary is set
update the grid entry for summary with the totals
create a new grid entry for summary with item key
set totals to zero
create a new grid entry for item
add item values to totals
if the summary is set
update the grid entry for summary with the totals
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
Thanks for your help. I'm now trying to write my program according to your psudo code. At first, I thought this program in a very confused way. Thanks a lot!
|
|
|
|