Jump to content

softweb001

Members
  • Posts

    21
  • Joined

  • Last visited

About softweb001

  • Birthday 03/26/1991

Previous Fields

  • Languages
    html, css, javascript, ajax, php

Profile Information

  • Location
    Nigeria

Recent Profile Visitors

4,592 profile views

softweb001's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. Hi Guyz, I am developing an application to list all the files and folders in a particular directory, i have successfully done that but ther problem is that i cant view the file or navigate the folders. Eg if i have a mytext.txt file...when i click on it i cant view it...Please help...thanks
  2. Hi.. I want to arrange the output of my code like this Maths Eng Student1 40 60 Student2 40 60 buh am having a problem doing it....... here is my code using System; class WorkFile { private string[] studentsarray; private string[] subjectsarray; private int[,] studentiesarray; public string CourseName {get; set; } public string[] students { get { return studentsarray; } set { studentsarray = value; } } public string[] subjects { get { return subjectsarray; } set { subjectsarray = value; } } public WorkFile( string name, int[ , ] studenties, string[] students, string[] subjects ) { CourseName = name; studentiesarray = studenties; studentsarray=students; subjectsarray=subjects; } public void DisplayMessage() { Console.WriteLine( "Welcome to the grade book forn{0}!n", CourseName ); } public void processgrades() { outputgrades(); } public int getaverage(int Row) { int total = 0; for (int column = 0; column < studentiesarray.GetLength(1); ++column) total += studentiesarray[Row, column]; int over= (int)total/studentiesarray.GetLength(1); return over; } public void outputgrades() { Console.WriteLine("The grades are"); Console.Write(" "); for (int test = 0; test < subjects.Length; ++test) { Console.Write("{0} ",subjects[test]); } Console.WriteLine("Average"); for (int Row = 0; Row < studentiesarray.GetLength(0); ++Row) { Console.WriteLine(students[Row]); for (int grade = 0; grade < studentiesarray.GetLength(1); ++grade) { Console.Write("{0, 8}", studentiesarray[Row, grade]); } Console.WriteLine("{0,9:F}", getaverage(Row)); } } } And the class using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace StudentScores { class Program { static void Main(string[] args) { string[] students = new string[2]; string[] subjects = { "Maths", "English", "Biology", "Chemistry", "Physics", "Economics", "Geography", "Agriculture" }; int[,] studenties = new int[2, 8]; WorkFile myworkfile = new WorkFile("Welcome to the main man", studenties, subjects, students ); for (int request = 0; request < students.Length; ++request) { Console.Write("Input the name of the student: "); students[request] =Convert.ToString(Console.ReadLine()); for (int scores = 0; scores < subjects.Length; ++scores) { Console.Write("input his {0} score: ", subjects[scores]); studenties[request, scores] = Convert.ToInt32( Console.ReadLine()); } } myworkfile.processgrades(); Console.ReadKey(); } } } pls help....Thanks...
  3. This is d code behind =================== void LoadProject() { FormsIdentity objTicket; objTicket = (FormsIdentity)User.Identity; string sUser = objTicket.Ticket.Name; string staffID = Session["Owner"].ToString(); sql = "Select * From Project_List Where Staff_ID=@staID And Status=@sTatus"; try { using (con = new SqlConnection(conString)) { con.Open(); cmd = new SqlCommand(sql, con); cmd.Parameters.Add("@staID", SqlDbType.VarChar).Value = staffID; cmd.Parameters.Add("@sTatus", SqlDbType.VarChar).Value = "Started"; SqlDataAdapter sda = new SqlDataAdapter(); sda.SelectCommand = cmd; sda.TableMappings.Add("Table", "recs"); DataSet set = new DataSet(); sda.Fill(set); int total = Convert.ToInt32(set.Tables[0].Rows.Count); if (total > 0) { SqlDataReader dtaReader = cmd.ExecuteReader(); dtlOngoing.DataSource = dtaReader; dtlOngoing.DataBind(); dtaReader.Close(); } else { lblMsg.Text = "No New project for this user!!!"; } } } catch (Exception ex) { lblMsg.Text = ex.Message.ToString(); } finally { con.Close(); } } and this is the Design =================== <asp:DataList CssClass="par2" ID="dtlOngoing" runat="server" OnCancelCommand="dl_Cancel" OnEditCommand="dl_Edit" OnUpdateCommand="dl_Update" DataKeyField="Project_ID"> <ItemStyle Font-Names="Times New Roman" Font-Size="10pt" ForeColor="Black" /> <AlternatingItemStyle BackColor="Red" /> <ItemTemplate> <p> Project Name:<strong> <%# DataBinder.Eval(Container.DataItem, "Project_Title") %> </strong><br /> </p> <p> Description:<strong> <%# DataBinder.Eval(Container.DataItem, "Description") %> </strong><br /> </p> <p> Status:<strong> <%# DataBinder.Eval(Container.DataItem, "Status") %> </strong> </p> <p> <asp:LinkButton ID="lbEdit" runat="server" Text="Edit" CommandName="Edit"></asp:LinkButton> </p> </ItemTemplate> <EditItemTemplate> <p> Project Name:<strong> <%# DataBinder.Eval(Container.DataItem, "Project_Title") %> </strong><br /> </p> <p> Description:<strong> <%# DataBinder.Eval(Container.DataItem, "Description") %> </strong><br /> </p> <p> Status: <asp:DropDownList ID="ddlStatus" runat="server"> <asp:ListItem Value="Started" Text="Started">Started</asp:ListItem> <asp:ListItem Value="Finished" Text="Finished">Finished</asp:ListItem> </asp:DropDownList><br /> <asp:LinkButton ID="lbCancel" runat="server" Text="Cancel" CommandName="Cancel"></asp:LinkButton>| <asp:LinkButton ID="lbUpdate" runat="server" Text="Update" CommandName="Update"></asp:LinkButton> </p> </EditItemTemplate> <SeparatorTemplate> <hr style=" border:5px solid double;" /> </SeparatorTemplate> </asp:DataList> Thanks.....
  4. ii have retrieved the data using a datalist but am getting an error about my with the OnCancelCommand attribute
  5. i want to display data on a page and i want it to be inside a div tag
  6. Hi...... I want to display the content of my database on a page in a div that will group them one by one and i want it to iterate through somthing like this in php while($row=mysql_fetch_assoc(#sql)){ echo "<div class='cont'>"; echo "$row['Names']"; echo "</div>"; } i want to do this in c# .NET Please help me out Thanks...........
  7. Hi, I am a new asp .net programmer and i want to update my database...please help me out thanks..
  8. hi guyz...i started asp .net few weeks ago and now i want to connect to sql server, so from my research most people write the connection string on each page but i want to write mine in a class so that i can justcall it anytime can someone please help me out please. Thanks...
  9. softweb001

    Closing Tags

    hi guyz........just having a little doubt about this two closing tags for ASP .NET form elements which of this is correct <asp:PlaceHolder>...</asp:PlaceHolder> or <asp:PlaceHolder /> and is it applicable for all tags Thanks
×
×
  • Create New...