Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
F

future3839

@future3839
About
Posts
134
Topics
85
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • ASP & JavaScript
    F future3839

    Hi, I have a few textbox on my form and would like to validate it through Java script. I know there is RequiredFieldValidator in asp.net but I would like to do that by Javascript. this is my code

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Register.aspx.cs" Inherits="WebApplication1.Presentation.Register" %>

    <!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></title>
    <script language= "javascript" type="text/javascript"></script>

    <style type="text/css">
        .style1
        {
            width: 100%;
        }
        .style2
        {
        }
        .style3
        {
            width: 153px;
            height: 17px;
        }
        .style5
        {
            width: 151px;
        }
        .style6
        {
            width: 91px;
        }
        .style7
        {
            height: 23px;
        }
        .style8
        {
            height: 26px;
        }
        .style9
        {
            height: 25px;
        }
        .style10
        {
            width: 151px;
            height: 23px;
        }
        .style11
        {
            width: 91px;
            height: 23px;
        }
    </style>
    <script language="javascript" type="text/javascript">
    

    // <![CDATA[

        function StId\_txt\_onclick() {
    
        }
    

    // ]]>
    </script>
    </head>
    <body>
    <form id="form1" runat="server">
    <div>

        <table class="style1">
            <tr>
                <td colspan="4" class="style7">
                    <asp:Label ID="PrsnInfo\_lbl" runat="server" Text="Personal Information"></asp:Label>
                </td>
            </tr>
            <tr>
                <td class="style9">
                    <asp:Label ID="StId\_lbl" runat="server" Text="Student ID" Font-Names="Arial" 
                        Font-Size="Smaller"></asp:Label>
                </td>
                <td class="style9" colspan="3">
                    <input id="StId\_txt" runat="server"
                        style="border: 0.3px inset #000000; height: 20px; width: 137px;" type="text" />
                    <asp:RequiredFieldValidator ID="Required
    
    ASP.NET csharp java javascript html css

  • class vs interface
    F future3839

    hi, could you please some one tell me when should I use interface? what is it,exactly?

    C# question visual-studio

  • J2EE Enterprise Application
    F future3839

    hi, could you please introduce me a good reference regarding starting how to start or tutorial regarding J2ee Enterprise application. thxx

    Java tutorial

  • EIS in Java Application
    F future3839

    Hi, I read an article regarding J2EE application Scenario. one of them is Multi-tier scenario. Multi tier application could be combination of Web Container, EJB and EIS. Could you please some one explain more about EIS Resources. I really haven't got its meaning. what is EIS tier and what is its responsibility. thans in advance

    Java java docker question

  • Array of Object
    F future3839

    Hi, I have define the following class in my practice.

    package array;
    public class Student {

    // definition of fileds
    private int studentId= 0;
    private String name;
    private String family;
    
    //definition of constructor
    public Student(int \_studentId, String \_name, String \_family){
        studentId= \_studentId;
        name= \_name;
        family= \_family;
    }
    
    //definition of methods
    public int getStudentId(){
        return studentId;
    }
    public void setStudentId(int newStudentId){
        studentId= newStudentId;
    }
    
    public String getName(){
            return name;
    }
    public void setName(String newName){
        name= newName;
    }
    
    public String getFamily(){
        return family;
    }
    public void setFamily(String newFamily){
        family= newFamily;
    }
    

    }

    then in main class I have these code

    package array;
    import java.io.*;
    import array.Student;
    public class Main {

    public static void main(String\[\] args) {
        //define Array of Object(Student's Class)
        Student\[\] st = new Student\[3\];
        st\[0\]= new Student(3400,"XXX", "YYY");
        st\[1\]= new Student(3800, "ZZZ", "WWW");
        st\[2\]= new Student(4200,"RRR", "MMM");
    
        System.out.println(st\[1\]);
        System.out.println("\\n");
    }
    

    }

    the problem is after I run the program nothing print out on the screen. is there problem in code??

    Java java data-structures help question

  • GlassFish
    F future3839

    Hello I am a beginner and practicing; I installed Netbeans and glassfish v3. then I went to file/new project and chose JavaEE/Enterprise application.in Servlet and setting option I add Glassfish but the finish buttun still disable. do I have to do some setting for glassfish? do you have any ideas? thanks

    Java question learning

  • Java Java EE
    F future3839

    Hi, I installed Netbeans 6.9 and try to work on Java. at first glance I faced 2 questions? when you open new project you see Java and java EE. what is the problem between them? what the meaning of enterprise Application? I would please if some one who has experience help me in this matter.

    Java help question java

  • Database administrator
    F future3839

    Hi, I would like to know what is the DBA tasks? what is he/she doing? if I wanna be DBA do I need to start with SQL Server or Oracle? cold you please advice me how should I start? what sort of certification do I need?

    Database database question sql-server oracle sysadmin

  • How to pass data to gridview(Long Post)
    F future3839

    Hi, every one. I am new in MVC and just practicing to improve my knowledge.I have the following codes and trying to pass data to GridView. but I get error after running the page. Its my PersonController

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.Mvc;
    using System.Web.Mvc.Ajax;
    using MvcApplication1.ViewModels;
    using MvcApplication1.Models;

    namespace MvcApplication1.Controllers
    {
    public class PersonController : Controller
    {
    HostelEntities1 HostelDB = new HostelEntities1();
    //
    // GET: /Person/

        public ActionResult Index()
        {
           var Persons = from peson in HostelDB.Person\_prs
                        select peson.fname\_prs;
           var ViewModel = new PersonIndexViewModel
           {
               Person = Persons.ToList(),
               NumberOfPeople= Persons.Count()
           };
            return View(ViewModel);
        }
    }
    

    }

    Its my ViewModel Class. I have class called PersonIndexViewModel

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;

    namespace MvcApplication1.ViewModels
    {
    public class PersonIndexViewModel
    {
    public int NumberOfPeople { set; get; }
    public List<string> Person { set; get; }
    }
    }

    and finally in View folder I have the following code

    <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<MvcApplication1.ViewModels.PersonIndexViewModel>" %>

    <%@ Register assembly="System.Web.Entity, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" namespace="System.Web.UI.WebControls" tagprefix="asp" %>

    <asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Index
    </asp:Content>
    <script type="text/C#" runat=server>
    protected void Page_Load(object sender, EventArgs e)
    {
    this.GridView1.DataSource = this.Model.Person;
    this.GridView1.DataBind();
    }

    </script>

    <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>This Page List Name Of People</h2>
    
    <p>select from<%=Model.NumberOfPeople%></p>
    <ul>
        <%foreach (string NamePeople in Model.Person)
          { %>
        <li>
            <%=NamePeople%>
        </li>
    
    ASP.NET csharp asp-net database linq design

  • View and textbox
    F future3839

    Hey, I write an view and when I try to run my page, running with error. its my code

    <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>

    <asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    InsertUpdatePerson
    </asp:Content>

    <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>InsertUpdatePerson</h2>
    <div id = "leftside">
        <%using (Html.BeginForm())
          { %>
            <div>
                <fieldset>
                    <div class="editor-label">
                        <label for= "Fname">FirstName:</label>
                    </div>
                    <div class="editor-field-textbox">
                        <!--textboxname,value,create attribute for textbox!-->
                        <%Html.TextBox("Fname",null, new{@class= "Form\_TextBox"})%>                        
                    </div>
                    
                    <div class="editor-label">
                        <label for="Sname">LastName:</label>
                    </div>
                    <div class= "editor-field-textbox">
                        <%Html.TextBox("Sname",null, new{@class= "Form\_TextBox"})%>
                    </div>
                    
                    <div class="editor-label">
                        <label for= "Gender">Gender:</label>
                    </div>
                    <div class="editor-field-textbox">
                        <!--textboxname,value,create attribute for textbox!-->
                        <%Html.DropDownList()%>
                    </div>
                    
                    
                </fieldset>
            </div>            
          <%} %>
    </div>
    

    </asp:Content>

    and its the error

    Line 18:

    Line 19:
    Line 20: <%Html.TextBox("Fname",null, new{@class= "Form_TextBox"})%>
    Line 21:

    Line 22:

    Error is line 20 I am just following an sample job.what could be the problem?

    ASP.NET help csharp html asp-net sysadmin

  • MVC and Dropdownliast
    F future3839

    hi, do you know how can I add dropdown list?

                        <%Html.DropDownList(??????????)%>
    
    ASP.NET question html asp-net architecture

  • Showing error message
    F future3839

    Hi, I am developing a simple web application in ASP.net. I would like to know in database connection if I face with error how I should show it. do I have to use java script? because unlike desktop application can't use message box.

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Data.SqlClient;
    using System.Data;
    using System.Data.Sql;
    using System.Configuration;

    namespace Test.DataAccessLayer
    {
    public class PersonDataAccess
    {

        SqlConnection Conn = new                             SqlConnection(ConfigurationManager.ConnectionStrings\["HostelConnectionString"\].ConnectionString);
    
        public void insert()
        {
            try
            {
                Conn.Open();
            }
            catch (Exception ex)
            {                
    

    ????????????????????????????????????????????????????????????????????????????
    }
    }
    }
    }

    ASP.NET csharp database java asp-net linq

  • Dataset or ado.net
    F future3839

    Hi, Just wondering to know, between ADO.net and Dataset which one is better for working with database. Could you please give me a link for beginner? thanks a lot

    ASP.NET csharp database question learning

  • insert and update
    F future3839

    I got it.its ok thanks a lot for your help

    Database help sharepoint tools tutorial question

  • insert and update
    F future3839

    thanks a lot. if I insert your code absolutely I don't have any problem with inserting.

    execute SprocInsertUpdatePerson null,'XXX','YYY','male','1988/10/10',1200

    the issue is when I am doing update who can I send parameter. for instance, I inserted 20 record by above code. now, I wanna update one of those record who have user entered id.

    Update Person_prs
    Set
    --Id = @id,
    fname_prs = @fname,
    srname_prs = @srname,
    gender_prs = @gender,
    dob_prs = @dob,
    transactionid_prs = @transactionid
    where id_prs = ????????????????????????????????????????????????????????

    Database help sharepoint tools tutorial question

  • insert and update
    F future3839

    hi, this is my code

    USE [Hostel]
    GO
    /****** Object: StoredProcedure [dbo].[SprocInsertUpdatePerson] Script Date: 10/29/2010 23:54:55 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    ALTER PROCEDURE [dbo].[SprocInsertUpdatePerson]
    (-- Definition of Storeprocedure's parameter
    @id int,
    @fname nvarchar(50),
    @srname nvarchar(50),
    @gender nvarchar(15),
    @dob datetime,
    @transactionid int
    )
    AS

    Declare @ReturnValue int
    if (@id IS NULL) --New Item
    Begin
    	insert into Person\_prs
    	(
    		--id\_prs,
    		fname\_prs,
    		srname\_prs,
    		gender\_prs,
    		dob\_prs,
    		transactionid\_prs
    	)	
    	values
    	(
    		--@id,
    		@fname ,
    		@srname,
    		@gender,
    		@dob ,
    		@transactionid			
    	)
    	
    	Select @id = Scope\_Identity()--Returns the last identity value inserted into an identity column in the same scope.
    	
    End
    
    
    else
    
    Begin --Update Item
    	Update Person\_prs  		
    	Set 
    	--Id = @id,
    	fname\_prs = @fname,
    	srname\_prs = @srname,
    	gender\_prs = @gender,
    	dob\_prs = @dob,
    	transactionid\_prs = @transactionid
    	where  id\_prs = @id
    	
    	Select @id as id
    End
    
    
    IF (@@ERROR != 0)
    BEGIN
    	RETURN -1
    END
    ELSE
    BEGIN
    	RETURN @ReturnValue
    END
    

    the id_prs field is autonumber. I run SP by this value

    execute SprocInsertUpdatePerson 11,'XXX','YYY','male','1988/10/10',1200

    select * from Person_prs

    after select table nothing insert into table.while I have to add data and when pass parameter can update it. could you please help me??

    Database help sharepoint tools tutorial question

  • insert and update
    F future3839

    thnks for ur reply, but i got confused. because I will get error in passing parameter for id in update and insert.

    Database help sharepoint tools tutorial question

  • insert and update
    F future3839

    Hi Guys, I am writing code for an insert part. I would like to write an store procedure which do both insert and update of my table. Imean when user call SP and pass the parameter if it was regarding insert add data otherwise update them. is it possible? here is my code

    USE [Hostel]
    GO
    /****** Object: StoredProcedure [dbo].[SprocInsertUpdatePerson] Script Date: 10/29/2010 20:45:42 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    ALTER PROCEDURE [dbo].[SprocInsertUpdatePerson]
    (-- Definition of Storeprocedure's parameter
    @id int,
    @fname nvarchar(50),
    @srname nvarchar(50),
    @gender nvarchar(15),
    @dob datetime,
    @transactionid int
    )
    AS

    Declare @ReturnValue int
    if (@id IS NULL) --New Item
    Begin
    set identity\_insert Person\_prs off
    	insert into Person\_prs
    	(
    		id\_prs,
    		fname\_prs,
    		srname\_prs,
    		gender\_prs,
    		dob\_prs,
    		transactionid\_prs
    	)	
    	values
    	(
    		@id,
    		@fname ,
    		@srname,
    		@gender,
    		@dob ,
    		@transactionid			
    	)
    	
    	Select @ReturnValue = Scope\_Identity()
    	
    End
    
    
    else
    
    Begin --Update Item
    	Update Person\_prs  		
    	Set 
    	--Id = @id,
    	fname\_prs = @fname,
    	srname\_prs = @srname,
    	gender\_prs = @gender,
    	dob\_prs = @dob,
    	transactionid\_prs = @transactionid
    	where  id\_prs = @id
    	
    	Select @ReturnValue = @id
    End
    
    
    IF (@@ERROR != 0)
    BEGIN
    	RETURN -1
    END
    ELSE
    BEGIN
    	RETURN @ReturnValue
    END
    

    the problem is how to set the parameter for update or insert. in update I have to pass parameter to do search while in insert don't need it. however I should define my parameter. does any one has idea,please?

    Database help sharepoint tools tutorial question

  • Inserting in Multi table With one Store Procedure
    F future3839

    Hi, I have a form which including different sort of information. for instance, some information is regarding to personal data which related to Table1 and some are for Table2 and the some are for Table3. all this information are in 1 form. Now, I just wondering to know, when I wanna insert data via Store procedure do I have to write SP for each of them? is there any approach to insert data with writing just one SP. how can I write SP, inserting data in Multi table. is it possible

    Database question sharepoint

  • Inserting in Multi table With one Store Procedure
    F future3839

    Hi, I have a form which including different sort of information. for instance, some information is regarding to personal data which related to Table1 and some are for Table2 and the some are for Table3. all this information are in 1 form. Now, I just wondering to know, when I wanna insert data via Store procedure do I have to write SP for each of them? is there any approach to insert data with writing just one SP.

    ASP.NET sharepoint question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups