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
  1. Home
  2. Web Development
  3. ASP.NET
  4. Help on Partial classes

Help on Partial classes

Scheduled Pinned Locked Moved ASP.NET
help
11 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Deepml
    wrote on last edited by
    #1

    I have doubt about the partial classes.Can we create gridview events in another partial class.

    C A A 3 Replies Last reply
    0
    • D Deepml

      I have doubt about the partial classes.Can we create gridview events in another partial class.

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      What happened when you tried ?

      Christian Graus Driven to the arms of OSX by Vista.

      1 Reply Last reply
      0
      • D Deepml

        I have doubt about the partial classes.Can we create gridview events in another partial class.

        A Offline
        A Offline
        Abhishek Sur
        wrote on last edited by
        #3

        yes you can. Partial classes gets all classes into a single unit.

        Abhishek Sur My Latest Articles Basics on LINQ and Lambda Expressions
        Create .NET Templates

        1 Reply Last reply
        0
        • D Deepml

          I have doubt about the partial classes.Can we create gridview events in another partial class.

          A Offline
          A Offline
          Abhijit Jana
          wrote on last edited by
          #4

          Deepml wrote:

          I have doubt about the partial classes.

          Here is two partial class having name Student. Partial Class 1 :

          public partial class Student
          {
          public void Addrecords()
          {
          }
          }

          Partial Class 2:

          public partial class Student
          {
          public void Exam()
          {
          }
          }

          When they compiled, they will combined into a single class. You can access them as a single.

          Deepml wrote:

          Can we create gridview events in another partial class.

          Yes.

          cheers, Abhijit CodeProject MVP

          D 1 Reply Last reply
          0
          • A Abhijit Jana

            Deepml wrote:

            I have doubt about the partial classes.

            Here is two partial class having name Student. Partial Class 1 :

            public partial class Student
            {
            public void Addrecords()
            {
            }
            }

            Partial Class 2:

            public partial class Student
            {
            public void Exam()
            {
            }
            }

            When they compiled, they will combined into a single class. You can access them as a single.

            Deepml wrote:

            Can we create gridview events in another partial class.

            Yes.

            cheers, Abhijit CodeProject MVP

            D Offline
            D Offline
            Deepml
            wrote on last edited by
            #5

            Thanks Abhijit.. I have created one folder in website as 'PartialClasses' where I am goin to put all the partial classes in tht folder. But how can I access that Class in my Default.aspx.cs page?

            A 1 Reply Last reply
            0
            • D Deepml

              Thanks Abhijit.. I have created one folder in website as 'PartialClasses' where I am goin to put all the partial classes in tht folder. But how can I access that Class in my Default.aspx.cs page?

              A Offline
              A Offline
              Abhijit Jana
              wrote on last edited by
              #6

              Deepml wrote:

              I have created one folder in website as 'PartialClasses' where I am goin to put all the partial classes in tht folder.

              hmm.. Put the folder in to App_Code Folder. Then try to access. Check This[^]

              cheers, Abhijit CodeProject MVP

              D 1 Reply Last reply
              0
              • A Abhijit Jana

                Deepml wrote:

                I have created one folder in website as 'PartialClasses' where I am goin to put all the partial classes in tht folder.

                hmm.. Put the folder in to App_Code Folder. Then try to access. Check This[^]

                cheers, Abhijit CodeProject MVP

                D Offline
                D Offline
                Deepml
                wrote on last edited by
                #7

                Actually I dont want to put that page class file in app_code folder.I want to keep the dll for that Default.aspx.cs page sepearatly. And I tried to create partial class in SampleApplication > PartialClasses > Default.cs for page Default.aspx.cs.But its giving me some what Temporary file error.I have deleted Temporary files also.Still its not working :( Please guide me how to create partial class : Below mentioned the code which i have written in partial class : /// /// Summary description for default /// public partial class default { public default() { // // TODO: Add constructor logic here // } } Also please tell me how to access this partial class in my Default.aspx.cs page.

                N 1 Reply Last reply
                0
                • D Deepml

                  Actually I dont want to put that page class file in app_code folder.I want to keep the dll for that Default.aspx.cs page sepearatly. And I tried to create partial class in SampleApplication > PartialClasses > Default.cs for page Default.aspx.cs.But its giving me some what Temporary file error.I have deleted Temporary files also.Still its not working :( Please guide me how to create partial class : Below mentioned the code which i have written in partial class : /// /// Summary description for default /// public partial class default { public default() { // // TODO: Add constructor logic here // } } Also please tell me how to access this partial class in my Default.aspx.cs page.

                  N Offline
                  N Offline
                  N a v a n e e t h
                  wrote on last edited by
                  #8

                  Is there any specific reason for using partial classes?

                  Navaneeth How to use google | Ask smart questions

                  D 1 Reply Last reply
                  0
                  • N N a v a n e e t h

                    Is there any specific reason for using partial classes?

                    Navaneeth How to use google | Ask smart questions

                    D Offline
                    D Offline
                    Deepml
                    wrote on last edited by
                    #9

                    Yes..I dont want to use BLL.Instead of that I want to use partial classes and basic idea to use it is to put more and more code in Partial classes. Please please help me out!!!

                    A 1 Reply Last reply
                    0
                    • D Deepml

                      Yes..I dont want to use BLL.Instead of that I want to use partial classes and basic idea to use it is to put more and more code in Partial classes. Please please help me out!!!

                      A Offline
                      A Offline
                      Abhijit Jana
                      wrote on last edited by
                      #10

                      Deepml wrote:

                      I want to use partial classes and basic idea to use it is to put more and more code in Partial classes.

                      Why not in a simple class? And if you are putting them in normal folder how will you access them? are you creating separate dll for that ? And why you are not storing it into App_Code Folder?

                      cheers, Abhijit CodeProject MVP

                      D 1 Reply Last reply
                      0
                      • A Abhijit Jana

                        Deepml wrote:

                        I want to use partial classes and basic idea to use it is to put more and more code in Partial classes.

                        Why not in a simple class? And if you are putting them in normal folder how will you access them? are you creating separate dll for that ? And why you are not storing it into App_Code Folder?

                        cheers, Abhijit CodeProject MVP

                        D Offline
                        D Offline
                        Deepml
                        wrote on last edited by
                        #11

                        Why not in a simple class? --Actually my project requirement is like that only.I have to use partial classes.So that after deployment of the Application on Client's server.We can upload only that page related dll on server. Why not in a simple class? And if you are putting them in normal folder how will you access them?are you creating separate dll for that -- No I am not creating any dll for that.Actually I am stuck up there only for how to access the partial classes from the normal folder. And why you are not storing it into App_Code Folder? --As per my knowledge after publishing the application it creates the only one dll for App_code,I dont want tht. Now I am trying to create partial class in web application only ..ie. SampleApplication > partial class for default But How can access this partial class on Default.aspx.cs page.. I have already wasted my one day for this.But i m not getting the solution nad there are very tight deadlines for the project.Please help me ASAP..

                        1 Reply Last reply
                        0
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        • Login

                        • Don't have an account? Register

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