Questions tagged as 'c#'

1
answer

Doubt PostBackUrl

I'm trying to use PostBackUrl in LinkButton within DataList . I tried the following, partially successfully. <asp:LinkButton ID="linkBtnMarca" CommandArgument='<%# Eval("Marca") %>' **PostBackUrl='<%# string....
asked by 21.06.2015 / 16:22
2
answers

Selenium, how to control the execution speed of the test?

Creating automated tests in C # using Selenium, I try to know how to control the execution speed of the test?     
asked by 07.07.2015 / 17:23
1
answer

Ajax.BeginForm returning PartialView as View

Good Night! I'm working on a Bed Management project. In a given View, I am displaying the Registered Nurses, and for filtering purposes , a field where you can search for the name of the Department to which the ward ( s) belongs. As picture...
asked by 02.06.2015 / 00:09
1
answer

Convert string to DateTime C # [duplicate]

How do I get a string something like "01/30/2015", for example, and convert it to datetime and keep that same date format? Being able to validate the date.     
asked by 13.10.2015 / 21:14
1
answer

Problem with ViewBag and ViewData for Creating Breadcrumbs

I need to get back from my controller to my data view project to mount the breadcrumb. My problem is: If I have ViewBag or ViewData or TempData, and the user is using two different windows, I can show the wrong data. There is a more "secur...
asked by 08.10.2015 / 16:50
1
answer

Doubt on automatic Migration with MigrateDatabaseToLatestVersion

With automatic migration is the database updated also when some property is excluded from my model class? That is, besides adding a new attribute if something is added to my class, does it also remove it? Like the example below, I'm trying to ge...
asked by 17.09.2015 / 01:56
1
answer

Execute a function at a given time

Hello, I recently wanted to run a method that sends newsletter-type emails from time to time. I believe I have found the solution, but I can not get through it, which is as follows: /************************************************************...
asked by 16.09.2015 / 20:39
1
answer

How to catch an error occurred on a webapi server?

I have a server running a WebAPI service, on the client I run the call to a POST URL like this: try { HttpWebRequest request; request = (HttpWebRequest)WebRequest.Create(URL); request.Method = "POST"; request.Proxy = null; req...
asked by 21.05.2015 / 00:09
2
answers

@If inside a body tag

How to put a if condition inside a <body> tag? When trying to do: @if (Request.Path.Substring(Request.Path.LastIndexOf("/") + 1).ToLower() == "default") { <body class="home" } else { <body> } It does...
asked by 21.05.2015 / 19:16
1
answer

C #: Show Thumbnail without resizing image in ASP

I do not want to let decrease images by setting width and height in asp. Example: <asp:Image Width="70" Height="90" ID="Image1" runat="server" ImageUrl=' <%# @"\imgpe\" + Eval("CODFOTO") + @".jpg" %>'/> I would like to res...
asked by 08.05.2015 / 20:23