Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9091951
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T22:43:57+00:00 2026-06-16T22:43:57+00:00

I have this code: namespace Zinc.Web.Extensions.DataModel.Training { public static class TrainingModuleProgressStateDataModelExtentions { public static

  • 0

I have this code:

 namespace Zinc.Web.Extensions.DataModel.Training
 {
   public static class TrainingModuleProgressStateDataModelExtentions
   { 
      public static string GetHintText(String aString)
      {

         //must still make up astring here
         return aString;
       }
   }
 }

 namespace Zinc.DataModels.Training
 {
    public class TrainingModuleProgressStateDataModel
    {
      public IEnumerable<UserTrainingPointsDataModel> UserTrainingPoints { get; set; }
    }
  }

  public class UserTrainingPointsDataModel
  {
    public virtual int InteractionType { get; set; }
    public virtual int Points { get; set; }
    public virtual string Name { get; set; }
    public virtual string IncentiveTrainingModuleOptionName { get; set; }
  }

in my repository i add to UserTrainingPoints:

 string RawPoints = row["RawPoints"].ToString();
 string[] rawPoints = RawPoints.Split(new char[] { '|' });
 List<UserTrainingPointsDataModel> points = new List<UserTrainingPointsDataModel>();

 foreach (var RawPoint in rawPoints)
 {
   string[] entry = RawPoint.Split(new char[] { ',' });
   var point = new UserTrainingPointsDataModel();
   point.Name = entry[0];
   point.Points = Convert.ToInt32(entry[1]);
   point.InteractionType = Convert.ToInt32(entry[2]);
   point.IncentiveTrainingModuleOptionName = entry[3];
   points.Add(point);  

 }
 trainingModuleProgressState.UserTrainingPoints = points;
 data.Add(trainingModuleProgressState);

in my view i need to call the extension method which will take values in UserTrainingPoints to make up a string which i will then show in a tooltip.

my question is how do i implement the extension method so i can call it in my view?

my view code:

 <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<Zinc.Models.Training.TrainingModuleProgressStateDataModelResults>" %>
 <%@ Import namespace="Zinc.Web.Extensions.DataModel.Training" %> //added this

  <% if (module.HasAssessment)
  { %>
     <div class="<%: moduleStateClass %>">&nbsp;</div>
     <div class="<%: moduleScoreClass %>"><%: module.ModuleScore %>%</div>
     <% Zinc.Web.Extensions.DataModel.Training.TrainingModuleProgressStateDataModelExtentions.GetHintText(module.UserTrainingPoints); %>  //still not correct here
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T22:43:58+00:00Added an answer on June 16, 2026 at 10:43 pm

    Since UserTrainingPoints is a IEnumerable<UserTrainingPointsDataModel> I would think your extension method signature should be

    public static string GetHintText(this IEnumerable<UserTrainingPointsDataModel> points)
    {
        string aString;
        //must still make up astring here
        return aString;
    }
    

    Then you can call it like this

    module.UserTrainingPoints.GetHintText();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this code; using System; namespace Rapido { class Constants { public static
I have this code #include <iostream> using namespace std; class Test{ public: int a;
I have this code: namespace TuyenTk { public partial class Form1 : Form {
I have this code behind: CustomUserControl.xaml.cs namespace MyProject { public partial class CustomUserControl<T> :
i have this code snippet #include <iostream> using namespace std; class Polygon { public:
I have this code: namespace Test { public partial class SearchField : UserControl {
I have this code: #include <iostream> using namespace std; class FooA { public: virtual
I have this code (C#): using System.Collections.Generic; namespace ConsoleApplication1 { public struct Thing {
I have this code from programming pearls #include <iostream> //#include <string> using namespace std;
I have this code namespace MSL{ template <typename T> class TListNode; template <typename T>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.