VS 2010 / Getting Result From JavaScript?
Feb 8, 2012
I want to be able to get specific website thumbnails and display them in an ImageBox. The easiest I've found is using a web service. Unforntuantely, most of these services don't allow me to just attach a URL. If I could, then I would just assign the URL of the ImageBox as the URL.
Instead, they force me to use JavaScript like this:
Javascript Code:
<script type="text/javascript" src="http://webshot.in/thumbshot/getshot.php?url=http://www.shrunktheweb.com"></script>
I can do that, but how I would I get the results and assign it to the ImageBox's property?
View 6 Replies
Similar Messages:
Sep 27, 2010
How can I pass the result of the linq to a textbox?
Code:
string search = txtSearchPO.Text;
IPSBLL.TransactionInfo dbInfo = new IPSBLL.TransactionInfo();
var q = from info in dbInfo.GetTransactionInfo()
where info.PONumber == search
select info;
txtPONumber.Text = q;
I need to access the column data something like this:
Code:
DataTable.Rows[index].columnName
How can I do that in LINQ?
View 7 Replies
May 20, 2010
I want to convert date from May 20 2010 2:54PM to 2010/5/17
Has anyone does this before.
I want this functionality both in C# and JavaScript.
In javascript I was trying the following
var dte = new Date();
dte = Date.Parse('May 20 2010 2:54PM')
however this was giving me NaN.
let me know if you want to see my code in C#, it isn't working and I think it is broken so am not posting here.
View 2 Replies
Jun 24, 2010
I'm still learning MVC. I would like to be able to display a list of items in a dropdownlist and then when I select one of those items invoke a new action that will process the selected item.
I can create the DropDownList but I cannot figure out how to return the selected item back to the controller. Below are some snippets from my code. The first shows the Index Action which just gets a list of pathnames which I call widgets. The second is an action which I'd like to use to process the selected file.
The third section is the view in the Index.aspx for the HomeController's Index View.
I have read several articles that show how to do this using JQuery or Ajax, but I'd like to do it without using either so that I can run this on a mobile browser that has no javascript.
View 5 Replies
Nov 18, 2010
I have a GridView in a div wrapper, there is some row headers along the left side that need to be always visible. This all works so far, but I need the wrapper to have a variable width to fit the browser size.
I got the desired width of the wrapper based on the browser width using some javascript but I can't figure out how to set this width as the wrapper.width.It doesn't have to update the wrapper width after the page loads or check for browser resizing.
my poor attempt at diagramming:
| |column headers |
| R |--------------|
| O | gridview data |
| W | |
| | this part |
| H | will scroll |<--->
| E | while the |
| A | Row headers |
| D | stay there |
| E | |
| R |______________ |
| S | scroll bar |
asp:(see edit below)
<pseudocode>
<table>
<tr><td>row headers</td> [code]...
I either need a way to set the wrapper.width = Width or a completely different and hopefully better way to achieve this.
I tried using a % for the width but it doesn't use the browser window as 100%, it takes the % of the full width of the whole GridView
which does nothing for me.
Edit: added some code
<script type="text/javascript">
var Width = window.innerWidth - 275 || document.body.clientWidth - 275;
var divElement = document.getElementById("wrappist");[code]....
View 2 Replies
Dec 28, 2010
I know the built-in ASP.Net validators come with a client-side framework, however I've been unable to find anything that lets me check a single validator for it's Valid state.
The validator in question is a RegularExpressionValidator, which I use to determine whether an e-mail address is valid or not.
Here's some brief code:
[code]....
View 1 Replies
Jul 1, 2010
I have this ListView that has a Drop Down List.Everything works fine (I think/hope) except that the drop down list are not showing its result correctly.This is the code.
Front-End
[Code]....
The code behind consist of the page_load and the ItemDataBound
[Code]....
View 3 Replies
Mar 1, 2011
I'm having a problem with my Linq to XML query. I'm getting the result data I want, but it's nested so deep that there must be a better way.Here is my XML:
[Code]....
I'm trying to get a list (simple string[]) of all Item IDs where Category Names contains "Other".Here is my Linq:
[Code]....
[Code]....
Here is a snapshot of my result from Visual Studio:The results I want are there ("item100", "item400", "item500"), but buried so deeply in the results var.
How can I get the query to return a simple
string[] = { "item100", "item400", "item500" }
View 4 Replies
Nov 11, 2010
I have a UserControl with two labels and a slider control on it. I have a javascript function that is called when the value of the slider changes, and it is supposed to update the text of the labels. The ascx code is:
asp Code:
<%@ Control Language="vb" AutoEventWireup="false" CodeBehind="AlignSlider.ascx.vb" Inherits="F1TimeTrials.Controls.AlignSlider" %><%@ Register assembly="Infragistics35.Web.v10.2, Version=10.2.20102.1011, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" namespace="Infragistics.Web.UI.EditorControls" tagprefix="ig" %> <script type="text/javascript" id="igClientScript"><!-- function sliderControl_ValueChanged(sender, eventArgs) { var leftLabel = document.getElementById('<%= Me.lblLeftValue.ClientID %>'); var rightLabel = document.getElementById('<%= Me.lblRightValue.ClientID %>'); var maxValue = sender.get_maxValueAsDouble(); var value = eventArgs.get_newValue(); leftLabel.innerHTML = value; rightLabel.innerHTML = maxValue - value; }// --></script> <asp:Table ID="table" runat="server"> <asp:TableRow runat="server"> <asp:TableCell runat="server"> <asp:Label runat="server" ID="lblLeftValue" Text="0" /> </asp:TableCell> <asp:TableCell runat="server"> <ig:WebSlider ID="sliderControl" runat="server" ValueType="Double" > <ClientEvents ValueChanged="sliderControl_ValueChanged" /> </ig:WebSlider> </asp:TableCell> <asp:TableCell runat="server"> <asp:Label runat="server" ID="lblRightValue" Text="100"/> </asp:TableCell> </asp:TableRow></asp:Table>
When I put this control on a page it works just fine. I drag the slider, the labels update with the new values. However, I actually need a large number of these controls on my page (around 10-20 I think), and this is where the problems start. When I change the slider on one of these UserControls, it changes the text of only the labels in the LAST instance of this UserControl on the page. It seems that the 'document.getElementById' function actually searches through the entire page rather than just the one UserControl. How can I fix this? How can I get the two label controls from this current UserControl instance, and not any other instance on the page?
View 39 Replies
Jun 18, 2012
I have a small issue here. I have a Div inside a TD that is defined like this
Code:
<td >
<div id="divGoogleEarthMap" runat="server" style="display:none"
>
<asp:HiddenField ID="HiddenField1" runat="server" />
<asp:ImageButton ID="GoogleEarthMap" runat="server" Height="100px"
OnClientClick="javascript:showimage('GoogleEarthMap'); return false;"
Width="100px" />
</div>
</td>
now the display style of this div is hidden. so i have a Javascript that runs when i close my popup. the first thing that javascript does is to populate two textboxes and show this div. It populate the textboxes nicely , but it fails to show or unhide the div. i have tried to set of code example using the normal javascript and also JQuery as depicted below
Code:
$('#divGoogleEarthMap').css('display', "block;");
and
Code:
var div = document.getElementById("divGoogleEarthMap");
div.style.display = "block";
or
Code:
document.getElementById('divGoogleEarthMap').style.display = 'block'; but still my Element cant be displayed.
View 2 Replies
Oct 21, 2011
Using this javascript to check a textbox lenght and enable a button if met. I'm getting an error msg though and not sure why:
Document.getElementByID is null or not an object
HTML Code:
<script language="javascript" type="text/javascript">
function SetButtonStatus(txtText, btnButton) {
if (txtText.value.length >= 6)
document.getElementById(btnButton).disabled = false;
[Code] .....
View 4 Replies
Feb 24, 2011
This is weird: When I try to debug ASP.NET web application, Visual Studio 2010 gives me this message "Script debugging of your application is disabled in Internet Explorer", but in my IE 7 (Internet Options --> Advanced), both "Disable Script Debugging" checkboxes are not checked.
what happens to my Visual Studio 2010?
View 1 Replies
Mar 12, 2012
I want some drag and drop stuff on my website. I found some javascript that works when using it with a simple html page, but when I tried to put it in my asp site it doesn't.
In site.master (between the head tags):
Code:
<script type="text/javascript" src="~/Scripts/Javscriptfile.js"></script>
and then:
Code:
<body onload="redips.drag.init()">
And the error is:
Microsoft JScript runtime error: 'redips' is undefined
View 3 Replies
Sep 28, 2010
I used to have intellisense for Javascript, including JQuery, in Visual Web Developer 2008. However in 2010 it has disappeared. I have tried resetting my settings,
View 3 Replies
Jun 30, 2011
I am dynamically creating controls from javascript. Now i want to access this is server side.
I assigned all the control values from dynamically created controls to hidden field and accessed that in server side. For this i need to create many hidden fields as much as dynamically added controls.
View 3 Replies
Aug 2, 2012
I've tried creating checkboxes, literalcontrols and textboxes. I need to generate checkboxes dynamically, depending on how many types of <whatever> the user has put in. I know how to do this (I think), but the problem is the controls don't work as they should.
If I create server controls, then for some reason I can't change the value with javascript. If I create client controls, then something appears to happen with the id so the server can't fetch the value (it doesn't recognize the id, allthough it's there in the html)
I can't use a regular checkbox with autopostback because there is to much happening at page load. On other pages on the site, this works, but on those pages the controls are not created dynamically.
View 7 Replies
Aug 9, 2010
Background: I use stored procedures exclusively for an ASP.NET application. I am using a DataReader to load a dataset object.
View 4 Replies
May 18, 2010
I have a clean installation of Windows 7 with VS2010 RTM and am trying to get the ASP.NET Development Server to work. When I run the project, the WebDev server starts and shows that it's listening on port x on localhost. I've tried:telnet to the port. The port is not listening. running netstat -o shows that the WebDev server is in fact not listening on any port. manually changing the WebDev port to a different port and restarted VS without effect. I have Windows Firewall turned off entirely and am not running any other firewall software either.
View 1 Replies
Apr 4, 2012
It cant be more simple. However I have tried a lot of examples and none of them have been working.
I have a very simple Excel file. I want to post these data in a gridview, Column A, B and C all placed in the Sheet1 and the file name is Book1.xls.
View 2 Replies
Sep 18, 2011
how to integrate my asp.net application to sharepoint 2010?
View 3 Replies
Nov 11, 2010
How do you convert a text that says Jan 2010 to 01/2010 in asp.net.
View 3 Replies
Jun 5, 2010
how i convert
4/5/2010 4:16:28 into this format 4 May 2010
View 13 Replies
Oct 15, 2010
I have a string "10/15/2010" I want to split this string into 10, 15, 2010 using c#, in VS 2010. i am not sure how to do this.
View 9 Replies
Oct 26, 2010
I've wrote the comprehensive post within my blog: [URL] In brief words everything is simple:
1. I've downloaded free Visual Studio C# 2010 Express and Visual Studio Web Developer 2010 Express
2. I've successfully installed these versions.
3. I've tried registration online - and got the appropriate keys which I've used for registration.
Finally all the keys I've got are not valid for the system - and after 30 days evaluation (for free version?) period all these products are not running anymore because all the keys I am providing from online registration are invalid.
View 2 Replies
May 10, 2010
I have been ising TFS 2010 with VS 2010 Ultimately for a couple of months now. I have a client who is using Visual Web 2010, does anyone know if this integrated with TFS easily?
View 1 Replies