|
how to convert value date-time ?
|
|
|
|
|
How can we help with this?your question doesn't make any sense at all. Improve your question with more info
To learn all there is to know. I know I'll be disappointed one day, but I've made a good start, and the eventual disappointment is likely to be brief.
-Roger Wright
modified 17-Feb-14 8:30am.
|
|
|
|
|
As with your other question, this one does not make any sense. Please clarify.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Do you want to convert a SQL DateTime to a C# DateTime ?
Light or darkness, we must choose ...
|
|
|
|
|
plz give the free sms gateway for asp.net , Gateway like http://ubaid.tk
The above mentioned gateway is not currently working so i am asking u sir.
Sir, I Hope u will give the correct solution for my Question.
|
|
|
|
|
|
Quote: Sorry, only 297,000 results found SELECT TOP 10 * FROM google_results
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Quick question..
I have WebAPI - like /api/SomeName
Called directly in my browser, it works - it returns JSON results.
I want to call WebAPI asynchronously.
using (HttpClient httpClient = new HttpClient())
{
string response = await httpClient.GetStringAsync("/api/SomeName");
return response;
}
But the GetStringAsync NEVER returns! Aaaarrrg
Is this the correct way to call it - of should I do something else?
Any tips? Advice? Hints?
maker of .Net thingys
|
|
|
|
|
Doesn't GetStingAsync returns Task<string>?
You may got an error that does not show up?
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
perhaps.
I'm closing the question and continuing down a different path.
Thanks though..
maker of .Net thingys
|
|
|
|
|
You could use jQuery's .ajax() method to call asynchronously from the client side, if you are using a browser. http://api.jquery.com/jQuery.ajax/[^]
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
I have a Menu Control in my ASP.Net page. The click event is not firing. Can anyone help me why the event is not firing.
|
|
|
|
|
Need more details. Please don't think anyone can help you with a question like that.
It's as bad as "My car doesn't start".
What's the technology stack you're using for asp.net? What version?
Are you trying to do this from javascript, or by code behind, or event routing? What version of VS? Are you even using VS?
Any code to share???
GaltSalt
maker of .Net thingys
|
|
|
|
|
ems>
<asp:MenuItem NavigateUrl="~/Default.aspx" Text="Home" />
<asp:MenuItem NavigateUrl="~/Research.aspx" Text="Research" />
<asp:MenuItem NavigateUrl="~/Team.aspx" Text="Team" />
<asp:MenuItem NavigateUrl="~/Methods.aspx" Text="Methods" />
<asp:MenuItem NavigateUrl="~/Excel Report.aspx" Text="Case Studies" />
<asp:MenuItem NavigateUrl="~/RehabAnalytics.aspx" Text="RehabAnalytics" />
<asp:MenuItem NavigateUrl="~/InputTestResults.aspx" Text="InputTestResults" />
protected void NavigationMenu_MenuItemClick(object sender, MenuEventArgs e)
{
e.Item.Selected = true;
}
|
|
|
|
|
Hi Rahesh,
Try like this.
<asp:Menu ID="NavigationMenu" OnMenuItemClick="NavigationMenu_MenuItemClick" runat="server">
<items>
<asp:MenuItem Text="menuItem1" NavigateUrl="Default.aspx" />
<asp:MenuItem Text="menuItem2" NavigateUrl="otherWeb.aspx" />
</items>
Internet Explorer have some issues with this , try in different browsers
|
|
|
|
|
Kandepu - was this solved?
maker of .Net thingys
|
|
|
|
|
Quote: "My car doesn't start". It's one of your spark plugs, duh.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Don't laugh! Many moons ago, I saw a 1972 Mercedes 220 in beautiful condition in a mechanic's yard. I asked how much he wanted for it. He said "Never mind, it don't work". But how much, I insisted.. "Oh, $500 I guess..." Paid it on the spot. Tried to get it to turn over; no joy - the mechanic sneered. Opened the hood - and noted that for that year, the spark plug cables were out of order from the distributor. Rearranged the cables, started it up and drove of... lol His wife came barreling out of the office yelling at the mechanic to get the car back.... I smiled as I passed by, saying Thank you!
maker of .Net thingys
|
|
|
|
|
That's great.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Hi Rajesh,
Try like this,
<asp:Menu ID="NavigationMenu" OnMenuItemClick="NavigationMenu_MenuItemClick" runat="server">
<items>
<asp:MenuItem Text="menuItem1" NavigateUrl="Default.aspx" />
<asp:MenuItem Text="menuItem2" NavigateUrl="otherWeb.aspx" />
</items>
IE have some problems, so try in diff. browsers
|
|
|
|
|
vs 2013 express for web
I have an MVC 4 web app and a WebAPI service returning JSON formatted data.
I tried to use Ajax.BeginForm to call the WebAPI service.
It does call it correctly
@model IEnumerable<MyApp.Models.SomeClass>
@using (Ajax.BeginForm(
new AjaxOptions
{
HttpMethod = "get",
Url="api/MyWebAPI",
InsertionMode = InsertionMode.Replace,
UpdateTargetId = "Resultlist"
}))
{
<div class="row">
<div class="col-lg-12">
<h3>Service Call Details - Method A</h3>
<input type="submit" class="btn btn-default" value=" Get Via Asynch Method A " />
</div>
</div>
}
<div id="ResultList">
<table class="table">
<tr>
<th>
@Html.DisplayNameFor(model => model.Name)
</th>
<th>
@Html.DisplayNameFor(model => model.Caption)
</th>
<th>
@Html.DisplayNameFor(model => model.Description)
</th>
<th>
@Html.DisplayNameFor(model => model.Active)
</th>
</tr>
@foreach (var item in Model)
{
<tr>
<td>
@Html.DisplayFor(modelItem => item.Name)
</td>
<td>
@Html.DisplayFor(modelItem => item.Caption)
</td>
<td>
@Html.DisplayFor(modelItem => item.Description)
</td>
<td>
@Html.ActionLink("Edit", "Edit", new { id = item.ClassifierGroupId }) |
@Html.ActionLink("Details", "Details", new { id = item.ClassifierGroupId }) |
@Html.ActionLink("Delete", "Delete", new { id = item.ClassifierGroupId })
</td>
</tr>
}
</table>
</div>
But the results don't fill the form.
Now, when the data came from the Home controller's Index function, that returned data as a View with model as an ActionRequest...:
public ActionResult Index()
{
ViewBag.Title = "Home Page";
IEnumerable<SomeClass> model = db.SomeClasses.ToList();
return View(model);
}
So how do I convert the WepAPI returned JSON data to something that the razor form can use for the Model data?
Any help appreciated.
GS
GaltSalt
maker of .Net thingys
|
|
|
|
|
The service is doing exactly what it's supposed to: return data.
What I really need is to convert that data into the PartialView that it belongs in.
I'm guessing there's no real way to do this in JavaScript, is there?
The only thing you can do is build the HTML manually in JavaScript.
So calling a WebAPI in Asynch JS is basically a useless oddity if what you want to do is send the contents to a View or PartialView, like it would from calling your Index controller function.
Can anyone prove otherwise?
maker of .Net thingys
|
|
|
|
|
I used another asych request to call the controller with the data - but this is only useful if the WebAPI service is on a different server.
maker of .Net thingys
|
|
|
|
|
Dear All,
I have no experience to build API before at all.
I'm using ASP.NET Web Form with C#.
How to start?
Thanks,
|
|
|
|
|
This isn't a good question for here. Try Google search for tutorial.
Even Microsoft.
http://www.asp.net/mvc/tutorials
GaltSalt
maker of .Net thingys
|
|
|
|