View Complete Post
Need help in for each loop. i'm poor in for each loop. i wanna create a for each loop that can give me 2 value in each rows.
i create a for loop.. but is a mulitple rows. Anyone can help ?
here is my code.
Dim x As Integer, y As Double, x1 As Integer
Dim d As Date, prevD As Date
Dim d1 As TimeSpan
temp_sec = ac.getTempTime(ddl_date.SelectedValue, ddl_id.SelectedValue)
For I As Int32 = 0 To temp_sec.Tables(0).Rows.Count - 1
If I Mod 1 = 0 Then
' To prevent list out of bounds
If I + 1 < temp_sec.Tables(0).Rows.Count Then
d = temp_sec.Tables(0).Rows(I).Item(0)
prevD = temp_sec.Tables(0).Rows(I + 1).Item(0)
d1 = prevD - d
x = d1.TotalSeconds
x = x1 + x
y = temp_sec.Tables(0).Rows(I).Item(1)
x1 = x
I need urgent help. (c#coding)
This is a work application form. There are 4 different parts, each of
all get different information from user. First, general information
like, firstname, lastname, birth etc. Second one is about educational
On page there is a dropdown with items; primary
education, high school, university etc.(User chooses last completed
education). And after that selection, here loads user controls according
to selection. During this I have problem with postback. It postbacks all page even I use updatepanel.
writing all code above, first main page(work application form) then
designer part; third usercontrol codebehind, last usercontrol designer
Please, I really need urgent help very very much.
Thanks to helpers.
First main page: codebehind:
public partial class _Default : System.Web.UI.Page
//these are usercontrols i talked about; highschool, university etc.
BizimUserControl buc = null;
liseusercontrol luc = null;
yuksekunivuc yuc = null;
universiteusercontrol uuc = null;
yukseklisansusercontrol yluc = null;
doktorausercontrol duc = nul
Finally i came to know because of firebug that ScriptResource.axd's (multiple) are making my files slow on first click
How do i merge them into 1 ??
1. ScriptResource.axd is making my page slow in first click.
On second click onwards its fine as i have added handler from http://madskristensen.net/post/Compress-WebResourceaxd-in-ASPNET.aspx It helps performance but from second click onwards.I am testing it with FireBug.
2. I have also seen and treid http://www.codeproject.com/KB/aspnet/AspNetOptimizer.aspx but not able to make out how to implement in my application.
3. I also tried http://madskristensen.net/post/Optimize-WebResourceaxd-and-ScriptResourceaxd.aspx but it has error, I tried making chnage as per the discussion in url but it is sill giving error.
4. I have also made scriptmanager as release mode
Please help its urgent
I've got a simple table with an ID, a NAME and an ARCHIVE booleen.
I want to write piece of code that goes through each record and...
If ARCHIVE is false and a folder hasn't been created for it, it will create it and go to the next record.
If ARCHIVE is false and a folder has been created for it, it will do nothing and go to the next record.
If ARCHIVE is true the whole folder will be moved to another folder and go to the next record.
When all records have been checked, the code will end.
I was thinking of using a SQL count to find out how many records there were and making a loop that starts at record one. runs the folder checking/creating/archiving code then +1 until the loop ends but I couldn't work out how to assign the query results to an integer...
I'm not asking for anyone to write the code. I think I probably already know 80% of the theory behind doing this I just can't glue it all together. I know you can do the folder stuff with the System.IO Directory Class...
Anyway, all input is welcome. Cheers guys!
Hi. I am having a really hard time with this code trying to loop through a datareader, and then enter the data into another table. The logic is that I get 2 columns path and document_no from an Oracle Database. I then need to check if the file in the path column is a valid path. If it is not valid, it should be inserted into a SQL Server 2005 database. My code is below, can anyone help? I'm getting a headache from it. If any further info is needed just let me know. Thanks.
Do While oraReader.Read()
path1 = oraReader("Path")
docno = oraReader("Document_No")
If (System.IO.File.Exists(path1)) Then
sqlCmd = New SqlCommand("INSERT INTO CHECKLINKS1 (DOCUMENT_NO) VALUES (@doc)", conn)
I had created one application and this is multi client application means code is same but setup is different for each client with diff. client Code in app config file, diff product code, upgrade code, setup name, display name.
So i am looking for a way to edit my MSI file dynamically and made changes into that for each client using code or any other way dynamically.
Do any one has idea how to do this Dynamically/Anyother.
Thanks in advance.