|
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
|
|
|
|
|
|
I need source code for sending sms using asp.net C# through gsm modem or Boardband of any brand please any one help
|
|
|
|
|
Don't Repost[^]
This question has been answered so many times
Check this[^]
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
|
|
|
|
|
Here we answer specific questions which members face during programming.
We can't work on the whole source code. You need to do that yourself.
If you face any difficulty while coding, feel free to come back here and ask another question with specific issue describing the scenario.
Members will be happy to help you then.
|
|
|
|
|
Hi All,
Its killing my time I have been freaking with it, for some time I was a using a computer in which I didn't have this problem. Now my company gave me new computer I started getting this problem. Since two days I am just dieing to run my application. Without running my application what can I do? I just don't want any encryption and decryption on my machine, if they want to do it on the Server let them do it. If I want to say I don't want to play with any encryption or decryption where can I say that. Why the heck isn't simple to say that I don't want it. I have been researching, but every one is explaining how to encrypt or decrypt but no one is saying how just get out of it. I don't want it that's it.
I have an asp.net application, I don't want to encrypt or decrypt my web config file, but still I am getting the following error. How can I say that I want neither encryption nor decryption for my application on my machine.
I went into Machine.Config file and commented the RSA Encryption section as below
<!--<configProtectedData defaultProvider="RsaProtectedConfigurationProvider">
<providers>
<add name="RsaProtectedConfigurationProvider" type="System.Configuration.RsaProtectedConfigurationProvider,System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" description="Uses RsaCryptoServiceProvider to encrypt and decrypt" keyContainerName="NetFrameworkConfigurationKey" cspProviderName="" useMachineContainer="true" useOAEP="false"/>
<add name="DataProtectionConfigurationProvider" type="System.Configuration.DpapiProtectedConfigurationProvider,System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" description="Uses CryptProtectData and CryptUnProtectData Windows APIs to encrypt and decrypt" useMachineProtection="true" keyEntropy=""/>
</providers>
</configProtectedData>-->
And my Web config doesn't have any encrypt or decrypt functionality defined as below.
<add key="SqlServerConnectionString" value="data source=xxxxSQLTEST\Prod;initial catalog=xxxx;password=xxxxxxxxxxx;persist security info=True;user id=xxxxxx"/>
<add key="OracleConnectionString" value="data source=xxxx;password=incnpdev;user id=xxxxx"/>
<add key="OleDbConnectionString" value="data source=(local);initial catalog=xxxxxx;password=xxxxxx;persist security info=True;user id=xxxxx"/>
Here is the following Error I am getting.
Server Error in '/apps/cnpweb/zzfdpsource/ORFdpProd' Application.
--------------------------------------------------------------------------------
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: An error occurred loading a configuration file: The protection provider 'RsaProtectedConfigurationProvider' was not found.
Source Error:
[No relevant source lines]
Source File: C:\inetpub\localinternet\webcon.config Line: 0
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18067
But if I keep the RSA section in the machine config file I am getting the following error. Why MS creates things like this. I don't even understand what is wrong. I the old machine I was not having this error, but when I got new machine to work on I am getting the following error. The same settings are there on every other developers machine they are not getting any error. This is making me nervous. Is my machine is incorrect what is wrong?
Server Error in '/apps/cnpweb/zzfdpsource/ORFdpProd' Application.
--------------------------------------------------------------------------------
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Failed to decrypt using provider 'RsaProtectedConfigurationProvider'. Error message from the provider: Bad Data.
Source Error:
Line 2: <!-- External Connection Strings from Microsoft: http:
Line 3: <connectionStrings configProtectionProvider="RsaProtectedConfigurationProvider">
Line 4: <EncryptedData Type="http://www.w3.org/2001/04/xmlenc#Element"
Line 5: xmlns="http://www.w3.org/2001/04/xmlenc#">
Line 6: <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#tripledes-cbc" />
Source File: C:\inetpub\localinternet\webcon.config Line: 4
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18067
When I am trying other thing I am getting the following error.
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC>aspnet_regiis -pa "NetFrameworkConfigurationKey" "ASPNET"
Microsoft (R) ASP.NET RegIIS version 4.0.30319.17929
Administration utility to install and uninstall ASP.NET on the local machine.
Copyright (C) Microsoft Corporation. All rights reserved.
Adding ACL for access to the RSA Key container...
No mapping between account names and security IDs was done. (Exception from HRESULT: 0x80070534)
Failed!
With all these error messages if someone can give me any idea or link or any sort of help. I will be very very thankful. I don't know what to do? I am researching heavily but no clue till now. Please help me, thanks in advance.
Thanks & Regards,
Abdul Aleem Mohammad
St Louis MO - USA
modified 14-Feb-14 19:30pm.
|
|
|
|
|
I want to select multiple rows of gridview using shift+select functionality. My condition is that there are no checkboxes. The user has to select the user on clicking the row and that row's color should change accordingly. Can anyone help? I am looking for this functionality from a long time. I have been able to get this functionality using checkboxes but that is not what i want.reply me pls.
|
|
|
|
|
|
plz tell me any one , The name of the free sms sending gateways for sending sms from different free sms web site
modified 14-Feb-14 10:24am.
|
|
|
|
|
Here you go: Free SMS[^]
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
|
As a part of my website, I need to diaplay a .swf file in my home page. Could anyone please tell me how to insert the .swf file in ASP.Net page
|
|
|
|