Subscribe: Custom Server Controls
Added By: Feedage Forager Feedage Grade B rated
Language: English
application  appsettings wsfed  certificate  jquery  new  script  select  system  textbox  thun trơn  web  wsfed  áo thun 
Rate this Feed
Rate this feedRate this feedRate this feedRate this feedRate this feed
Rate this feed 1 starRate this feed 2 starRate this feed 3 starRate this feed 4 starRate this feed 5 star

Comments (0)

Feed Details and Statistics Feed Statistics
Preview: Custom Server Controls

All Forums

All Forums

Last Build Date: Wed, 21 Mar 2018 09:56:40 -0700


Data Annotations “Display” Attribute


Hi there,

How to include apostrophe in Display Name attribute?  If I do this

[Display(Name = "Student's Name")]

Chrome is showing me Student's Name.  IE and Firefox shows Student's Name.


Hide the query Datatable Individual column select inputs


Dear All,

I am having the Jquery data-table with select inuts for each column. 

My client is requesting to hide the input select "Office" . Can any one please help me how can I do it.


Name Position Office Age Start date Salary
Tiger Nixon System Architect Edinburgh 61 2011/04/25 $320,800
Garrett Winters Accountant Tokyo 63 2011/07/25 $170,750
Name Position Office Age Start date Salary

Is it possible on the click of the button to Export To Excel, to take the value entered in the textbox by the user, and display it in the ExcelSpreadsheet as a regular field like the rest of the databound columns?


Hi. I have a gridview that gets data from a sql datasource and has a template field.  In that template field, there is  a textbox in an ItemTemplate.     That all works great, the problem I'm having is when the user Exports to Excel.  The gridview looks fine with all the columns, EXCEPT for the column that has that ItemTemplate with the  TextBox.  When it exports to excel, it actually displays a textbox inside the cell of the Excel spreadsheet. 

Is it possible on the click of the button to Export To Excel, to take the value entered in the textbox by the user, and display it in the ExcelSpreadsheet as a regular field like the rest of the databound columns? 

Here's my TemplateField from my gridview...


and here is my export to Excel

Private Sub ExportToExcel(ByVal strFileName As String, ByVal dg As GridView)
        Response.Buffer = True
        Response.ContentType = "application/"
        Response.AddHeader("content-disposition", "attachment;filename=" & strFileName)
        Response.Charset = ""
        Me.EnableViewState = False
        Dim StringWriter As New System.IO.StringWriter()
        Dim HtmlTextWriter As New System.Web.UI.HtmlTextWriter(StringWriter)
End Sub

Multiple Similar Projects - Management


Apologies if this has been asked before, I'm struggling to find resources on it.

I'm working on an website, but we run a series of newspapers all on different domains.

The question is, how can I easily & quickly manage these projects? I made the mistake of copy & pasting the first project which didn't work. Is there a quick and easy way to manage them and roll out updates without copy & pasting everything into every other project?

dropdown list select only one



How do i restrict the user to select only one roles? below is my sample code.

@Html.LabelFor(m => m.wfRoleName, new { @class = "col-md-2 control-label" })

@Html.DropDownList("Role", (MultiSelectList)ViewBag.Role, new { multiple = "multiple" })



Web.config CustomErrors mode=off still errors...


I have an MVC application that i am trying to publish via web deploy, i've configured everything correctly for the customprofile.pubxml , but when the site goes live on the remote server, I am getting the "The current custom error settings for this application prevent the details of the application error from being viewed remotely" ; i have conquered this numerous times in the past by setting the CustomErrors mode to off, but doing so now , I still get the same error:

...and it needs to go in the system web group




Get value active in html


Hi all,

I have link :

I want get value : "Class=active" in "disagree" checkbox when i click "register" button !
How can i do that ?

Thank you very much !

How to show the title of mi page in the url without getting error : The resource cannot be found.


Hi, i would love to show some url like this :


the problem is that it works only if i put like this :


I done those routing but none of them works...

                name: "Default",
                url: "{controller}/{action}/{id}",
                defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }

                name: "Default-Title",
                url: "{title}",
                defaults: new { controller = "Home", action = "Index", title = UrlParameter.Optional }

               name: "Default-Title-Controller",
               url: "{controller}/{title}",
               defaults: new { controller = "Home", action = "Index", title = UrlParameter.Optional }

                name: "Default-Title-Controller-Action",
                url: "{controller}/{action}/{title}",
                defaults: new { controller = "Home", action = "Index", title = UrlParameter.Optional }

In my controller the index is like this

public ActionResult Index(string title)
            ViewBag.CurrentTitle = "";
            //Getting TITLE
            if (title != null)
                // Checkf if exists
                if (db.AgenceWebs.Any(m => m.AgenceWebNomUrl == title))
                    ViewBag.CurrentTitle = title;

            return View();

How to make it works without putting /Home/index/ but only the domain name and my title?

C# Spell check libraries


Is there any secure libraries/plugins for spell checking in C#?

IDX10503: Signature validation failed after updating to Owin.Security v 4.0.0


As per subject, I updated the Owin.Security.WsFederation and dependant packages to version 4.0 and I get the error. I did not make any code changes other than changing using Microsoft.IdentityModel.Protocols; to using Microsoft.IdentityModel.Protocols.WsFederation; where is the WsFederationConfiguration class seems to be now. Here is my StartupAuth: public void ConfigureAuth(IAppBuilder app) { app.UseCookieAuthentication( new CookieAuthenticationOptions { AuthenticationType = CookieAuthenticationDefaults.AuthenticationType }); // Create WsFed configuration from web.config wsfed: values var wsconfig = new WsFederationConfiguration() { Issuer = ConfigurationManager.AppSettings["wsfed:Issuer"], TokenEndpoint = ConfigurationManager.AppSettings["wsfed:TokenEndPoint"], }; /* * Add x509 certificates to configuration * */ // certificate.1 must always exist byte[] x509Certificate; x509Certificate = Convert.FromBase64String(ConfigurationManager.AppSettings["wsfed:certificate.1"]); wsconfig.SigningKeys.Add(new X509SecurityKey(new X509Certificate2(x509Certificate))); // certificate 2 may exist if (ConfigurationManager.AppSettings["wsfed:certificate.2"] != null) { x509Certificate = Convert.FromBase64String(ConfigurationManager.AppSettings["wsfed:certificate.2"]); wsconfig.SigningKeys.Add(new X509SecurityKey(new X509Certificate2(x509Certificate))); } // certificate 3 may exist if (ConfigurationManager.AppSettings["wsfed:certificate.3"] != null) { x509Certificate = Convert.FromBase64String(ConfigurationManager.AppSettings["wsfed:certificate.3"]); wsconfig.SigningKeys.Add(new X509SecurityKey(new X509Certificate2(x509Certificate))); } // Apply configuration to wsfed Auth Options var wsoptions = new WsFederationAuthenticationOptions { SignInAsAuthenticationType = CookieAuthenticationDefaults.AuthenticationType, Configuration = wsconfig, Wreply = ConfigurationManager.AppSettings["wsfed:Wreply"], Wtrealm = ConfigurationManager.AppSettings["wsfed:Wtrealm"], }; wsoptions.TokenValidationParameters.NameClaimType = ""; // Add WdFederation middleware to Owin pipeline app.UseWsFederationAuthentication(wsoptions); } Is there something else 4.0 needs to validate the signature? I assume it's talking about the signature of the token from the issuer. I didn't see how to enable ShowPII to see what key it's looking at. I am using MVC5 with the full framework. Not core. [...]

.NET MVC localized resource file is not read


I was trying to add some satellite resource files to display different language I followed these two posts in general stackoverflow post Localization of a Site in MVC5 Using Resource File here's what I have done in nutshell (using visual studio 2017, .net framework 4.5) I created a folder named it "Resources" I right clicked this folder and created a file named it "Lang.resx", added a string pair (name: Welcome, value: Hello), then switch it to public and save I right clicked this folder and created another file named it "", added a string pair (name: Welcome, value: Hola), then switch it to public and save I opened up web.config and added following line to System.Web I opened up a blank view, write the following to that view @{ System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.GetCultureInfo("es"); System.Threading.Thread.CurrentThread.CurrentUICulture = System.Globalization.CultureInfo.GetCultureInfo("es"); }
The output is as following: Hello Spanish Spanish As you can see, the culture is changed but somehow the is not read, I have created multiple new project in different hosting VPS, the result is always the same. So there must be something I've done incorrectly, or some steps missing [...]

Can't login after deployment



I have a simple web-site that uses SQLite for identifying users. I use SQLiteIdentity.dll for storing my users. I can login and register users fine. After deploying my website on my local machine now I can't login. A record created in my DB fine after registering a new user. But still this user or any other users can't login and can't get access to restricted pages. No errors being logged (I have error messages if page is invalid or user not found in db).

looping through a DataList to see whether a certain value exists


I have looked in various places, but I'm still stuck.

All I want to do is to see whether the value i enter in my textbox actually exists in the C# DataList when I hit my "retrieve" button.  If the value exists, I want it to go to a certain page; if not, I want it to do something else. 

Can someone please tell me?  I cannot continue with my project if I can't fix this.

Any help is greatly appreciated

The design(.aspx) side of my page looks like this

My datalist's name is 'dlnames'.  The textbox's name is 'txtauthorname'

passing the mvc exam



im thinking of taking the mvc exam

but the thing is i have no practical experience cause i only did web forms projects for the last three years,i only studied mvc for like 2 months through books and online courses 

what you think should i take it ,what ur advice any advice will be useful for me?

nopCommerce? looking for specialized cart solution


Is nopCommerce a good cart if I want to integrate it into my own MVC website application? Can it be customized? This website application isn't just selling products. It is selling services with seating capacity and date ranges (think swimming or childcare like after school).

I created my own cart in the previous webforms version of this application, but there might be something better for my new rebuild in MVC.

Any suggestions on a highly configurable cart that can be customized for this type of application?

I have a repository that looks like this


public void Update(List entity)
 if (entity == null)
                    throw new ArgumentNullException("entity");


now i want to add a concurrency check, and if a record fails the check it doesn't get update but doesn't stop the others being updated, everything I have seen uses try catch but i am not sure how i get arround it.

Any thoughts would be appriciated.

Xưởng may áo thun trơn giá rẻ - 0938.689.062


Xưởng may áo thun trơn giá rẻ chuyên may và cung cấp áo thun trơn giá sỉ, bao gồm các loại áo thun trơn 4 chiều, áo thun trơn 2 chiều, áo thun trơn thời trang, áo thun trơn cá sấu… với giá gốc tận xưởng, áo thun trơn giá cạnh tranh nhất TPHCM (Nhận bán sỉ trên toàn quốc).


xưởng sản xuất số lượng lớn với mong muốn là nhà cung cấp sỉ uy tín áo thun trơn giá rẻ đến với các bạn muốn nhập hàng số lượng lớn phục vụ công việc kinh doanh. AIM integration


I'm getting an error when trying to submit an order using AIM integration. The error and code are below.

I'm reading the page below. I am uncertain if the line below has been deprecated or not

--->STATUS: Supported but no longer updated

Thread ID: 21
Is impersonating: False
Stack trace: at store.readHtmlPage(String url) in store.aspx.vb:line 686
at store.SubmitBtn_Click(Object sender, EventArgs args) in store.aspx.vb:line 259

below is the main parts of the code, see below.

Dim myWriter As StreamWriter = Nothing

        Dim objRequest As HttpWebRequest = CType(WebRequest.Create(url), HttpWebRequest)
        objRequest.Method = "POST"
        objRequest.ContentLength = strPost.Length
        objRequest.ContentType = "application/x-www-form-urlencoded"

            myWriter = New StreamWriter(objRequest.GetRequestStream())

        Catch e As Exception
            Return e.Message
            myWriter.Close() ' line 686
        End Try

SignalR raw data read


Hi guys,

I've been playing around with SignalR and it seems like a really cool protocol. I have an application that upload race data over TCP/IP V2 to a server application, its Mylaps I am using.  I want to see if I can take the raw data and show it in a html page?

Is there any sample code? I've been trying the SignalR chat application but it doesn't really work, unless I modify it maybe?

Once I have the data I will parse it to an SQL server or similar database.

Thanks guys

Jquery date doubts on previuos date



I Used This Code In My Aspx Page

 rel="stylesheet" href="//" />

For Example If i want to set 13-Jan-2017 user wont select any previous date..

how to lock previous date based on my given date..

Thanking You