TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Shubham Baranwal
NA
38
946
How to return multiple values ?
Feb 26 2020 6:47 AM
I've the mentioned code in my project.
public class CmsUrlConstraint : IRouteConstraint
{
public bool Match(HttpContextBase httpContext, Route route, string parameterName, RouteValueDictionary values, RouteDirection routeDirection)
{
var cms = new BrainSmith.Models.HireDevelopersTemplate();
var url = values.Values.FirstOrDefault();
string RouteName = cms.GetHireTemplateUrl(url.ToString()).Tables[0].Rows[0]["RoutingURL"].ToString();
var categories = new[] { RouteName };
if (values[parameterName] == null)
{
return false;
}
var category = values[parameterName].ToString();
return categories.Any(x =>x==category);
}
}
Here I want to return multiple values in
categories
and
GetHireTemplateUrl
is called in another class file to select
RoutingURL
and
TemplateId
from
Stored Procedure ,
I only want to get RoutingURL and TemplateId both returns at a time ...
Please suggest best answer for it.
Reply
Answers (
2
)
Dashboard with Google Analytics
column name error