var path = httpcontext.current.request.url.absolutepath;
var pastslashpos = path.lastindexof('/') + 1;
var countuntildot = path.indexof('.', pastslashpos);
countuntildot = (countuntildot >= 0 ? countuntildot : path.length) - pastslashpos;
pagename = path.substring(pastslashpos, countuntildot);
- What is the most efficient way or best practice for null check when you use Split and FirstOrDefault methods together?
- What is the best way to check IQueryable result set is null
- What is the best way to check two List<T> lists for equality in C#
- What is the most efficient way to get comparison statistics for data from 2 large tables
- What is the most efficient way to obtain an ordered range using EntityFramework?
- What is the best way to check and retrieve the first item of a collection?
- What is the best way to query a database for records within n miles of a zip code?
- What is the return type for a anonymous linq query select? What is the best way to send this data back?
- Linq query, how to check for a null value and use the value 0 in place of a null?
- What is the best way to transparently log changes to objects when using LINQ-to-SQL?
- What is the best way to get the percentage for an object in linq list and map it to JSON?
- What is the most efficient way to join two lists in C# on a common field?
- What is the most efficient way to select an XML value based on one of its associative attributes using C#
- in mongodb, what is the most efficient way to get the first and last document
- Best way to check for duplicates when adding a new Row in DataSets?
- What is the most compact way using LINQ to check whether an IEnumerable<int> is ordered?
- What is the linq select syntax to check for xml data with null elements?
- What is the best way in assigning foreign key when using entity framework & LINQ to Entities?
- What is the best way to find length of split characters from the given string by using String.Split() Method or Linq Lambda Expression in C#
- Best way to check for null for multi child object
- What is the best way to generate an id for new Xelement in Linq to XML?
- What is the best practice for querying related tables using LINQ given the following example?
- What is the most efficient way to extract information from a text file formatted like this
- Filtering MySQL query only when the filter values are not empty-string, white-space or null best practice
- Where, Select and Single in Linq: What is the most efficient use with ASP.NET Core?
- In Linq for Entity Framework, what is the best practice for returning a resultset by querying multiple columns for a search string?
- What is the correct way to use Linq to reference the table you instantiate with your ViewModel as a list to generate a list of 'SelectListItems'?
- what is the best practice for selecting extended entities in EF5,
- The most efficient way to check records in a database exist, using Linq
- What is the biggest mistake people make when starting to use LINQ?
More Query from same tag
- Casting an IEnumerable<TEntity> to an IEnumerable<TResult> while ensuring deferred execution
- C# How to find index of a object in listbox datasource (binded with List<T>) by Linq
- Binding multiple DataSources to a single ListView
- Join Parent, Child and GrandChild tables with latest record from grandchild table using LinQ in C#
- LINQ query to push an item to the array of a Mongo Document
- LINQ Return DISTINCT Values
- How to build expression tree for Contains<T>
- Where clause on Linq Extension method
- How can I do an EF Linq query, including a subset of related entities
- Pass a lambda as a variable to a .Select()
- On the Syntactic Mapping of Transparent Identifiers in LINQ Queries
- Why is this defaultIfEmpty choosing ienumerable<char> instead of string?
- error when converting linq lambda query to list
- Return back all messages that contain specific users in LINQ
- Understanding the various options for runtime code generation in C# (Roslyn, CodeDom, Linq Expressions, ...?)
- Is it possible to accelerate (dynamic) LINQ queries using GPU?
- Getting information from a datagrid
- How to create an asynchronous repository with EF Core?
- Translate Queryable<T> back to IMongoQuery
- How can i concat email address? C#
- C# - How to select distinct random records from datatable
- Automapper Custom Map use "Include" to get children count
- LINQ find all child entities meet requirements
- Is there a better way to do this Linq query and function?
- Find And Remove Items From Collection
- Left Trim in Linq
- C# Lambda Left Join - can't get it working
- LINQ result is not showing as expected
- Select current week using LINQ
- Running different code depending on what Net Framework version is installed