Hi there..
I am new in silverlight ..
unlike windows form ,I am unable to find menu item in silverlight .
How to add menu item in xaml file.
I have to do this
Thanks
Hello
I'm using asp.net mvc 2 and I'm not sure howto structure the models and viewmodels. In the nerddinner there is only 1 of each.
Shall I have only 1 viewmodel of each entity (?) and then have 1 model for each form-modifing viewpage? So that viewmodel contains like all it ever would need, like: PagedFoo FooClass ..., FooClass, Foowithbunnies, FooClassStats... ?
/M
Im using c# .net windows form application. I have two comboboxes A and B .I have pouplated A with some values. Now if i select any one value from A, I should be able to populate B with all the items of A except the selected item .
Does anyone know of free webservice that returns a list in the form of JSON? I have searched many webservice sites but they all return xml. Geonames.org is not required.
List all that you know of please. thanks.
I have gridview that is loaded from another aspx page after an ajax call, the problem is it works on chrome/firefox/safari but using ie9 the ajax call would work fine during the first call but when i try to call the function again it throws an 304 status on the network tab of ie9 dev tool and the gridview is not refreshed.
Here is the jquery code:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="LoadCoursesGridViewHere.aspx.cs" Inherits="CoursesGridView" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script src="Scripts/jquery-1.8.2.js" type="text/javascript"></script>
</head>
<body>
<form id="form1" runat="server">
<div id="Gridview-container">
<asp:GridView ID="GridView1" runat="server">
</asp:GridView>
</div>
<asp:TextBox ID="TextBox1" runat="server" ViewStateMode="Disabled"></asp:TextBox>
<%-- <asp:Button Text="text" ID="btn" OnClientClick=" __doPostBack('UpdatePanel1', '')" runat="server" />--%>
<input type="button" id="btn" value="insert"/>
</form>
<script type="text/javascript">
$("#btn").click(function () {
var a = $("#TextBox1").val();
$.ajax({
url: 'WebService.asmx/insert',
data: "{ 'name': '" + a + "' }",
contentType: "application/json; charset=utf-8",
type: "POST",
success: function () {
// alert('insert was performed.');
$("#Gridview-container").empty();
$("#Gridview-container").load("GridViewCourses.aspx #GridView1");
}
});
});
</script>
</body>
</html>
What happen is that after click the button it will insert the textbox value in the database through the webservice 'insert' and then reload the gridview that is placed inside a different aspx page. The problem is that when I ran it on IE9 during the 1st insert everything works properly but the succeeding inserts does reload the gridview and I noticed that it says '304' on the network tab of ie9 dev tool.
I understand that I can do something like in rspec:
let(:project) { Project.new }
but in my app a project accepts_nested_attributes_for tasks and when I generate the Project form I build a task along with it using:
@project = Project.new
@project.tasks.build
I need something like:
let(:project) { Project.new.tasks.build }
but that doesn't seem to work.
How can I do this as a let in my rspec test?
using :
Dim a As [Assembly] = [Assembly].LoadFile("C:\test.exe")
Dim testTP As Type
testTP = a.GetType("SplashScreen", True, True)
obj1 = Activator.CreateInstance(withoutFOR)
obj1.show()
my prog made reflection to test.exe SplashScreen loaded , also obj1 filled
when SplashScreen disposed - MainForm loaded the obj1 isnothing!
when try to access obj1 VS say :
AccessibilityObject = {"Cannot
access a disposed object. Object name:
'SplashScreen'."}
I want always obj1 filled from the active form!! how????
I have a string;
String allIn = "(50 > 100) AND (85< 100)";
Now I need to evaluate if the conditions inside are TRUE or FALSE, how can I do it?
In real the string will be a value from a field in my DB, where I will substitute different values and they will form a string as shown above.
I have a CGI based form that I am working with and I would like to be able to include some PHP code in the generated results. However, when I do this, the PHP does not appear to get processed and just ends up being displayed in the resulting web page.
Is what I am doing actually possible or am I missing something?
Thanks.
I have an Microsoft Access Database (.accdb) that stores information needed in an application.
Is there a way to distribute my application with the access database without having the user have access installed or get the user to go and download and install the office runtime?
The windows form application that uses the access database is developed in VB.net in Visual Studio 2008.
Try running the code, I know the problem is in the 1. part.
Thanks in advance,
P.S. I'm a newbie in JS.
<html>
<head>
<script>
{
//1. part
var Cookies = "";
function createCookie(name,value,days) {
if (days) {
var date = new Date();
date.setTime(date.getTime()+(days*24*60*60*1000));
var expires = "; expires="+date.toGMTString();
}
else var expires = "";
document.cookie = name+"="+value+expires+"; path=/";
}
function readCookie(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for(var i=0;i < ca.length;i++) {
var c = ca[i];
while (c.charAt(0)==' ') c = c.substring(1,c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
}
return null;
}
function eraseCookie(name) {
createCookie(name,"",-1);
}
//2. part
function saveIt(name) {
var x = document.forms['cookieform'].cookievalue.value;
if (!x)
alert('Please fill in a value in the input box.');
else {
Cookies.create(name,x,7);
alert('Cookie created');
}
}
function readIt(name) {
alert('The value of the cookie is ' + Cookies[name]);
}
function eraseIt(name) {
Cookies.erase(name);
alert('Cookie erased');
}
function init() {
for (var i=1;i<3;i++) {
var x = Cookies['ppkcookie' + i];
if (x) alert('Cookie ppkcookie' + i + '\nthat you set on a previous visit, is still active.\nIts value is ' + x);
}
}
}
</script>
<body>
<form name = "forma">
<input type = "text" name = "cookievalue">
<input type = "button" value = "Spremi" onClick = "saveIt('ppkcookie1')">
<input type = "button" value = "Ispisi" onClick = "readIt('ppkcookie1')">
</form>
</body>
</html>
I have created activex control in vb6. It has standard label with its backstyle property set as transperant. Also activex control form itself has property backstyle set as transperant. In Vc++ I placed this activex control in property sheet page. But i am not getting this activex control displayed in running mode. If we change backstyle property to opaque then it is working fine. How to resolve this issue
In my past projects I've been using webform to implement windows form style complicated backend admin page by using asp.net webform.
Just wondering by using asp.net mvc, can it make this kind of complicated UI page much easier?
how do I get all the records for latest date. The date filed in my db is called recordEntryDate and it is in this form 2010-01-26 13:28:35
Lang: php
DB: mysql
the thing is that I have a form with a textbox and a button and a hidden field, now what i want to do is to write something in the textbox ,pass it to the hidden field and then access that thing written in the hidden field in the controller . how can i do that?
I have a scenario where I need to send a series of data across 2 clients.
The data includes Serialized XML that will contain commands that the other client will need to react to.
I will also need to send images across the wire as I need to provide a chat facility in the form of video/audio chat.
I would like a single communication medium for both, as the number of messages/commands might be a few.
WCF or Sockets?
there is a form where a user enters a date in [Text4]
when users clicks OK, the following code is run:
DoCmd.OpenReport "All_Ones", acViewPreview
the following is the control source of a textbox on the report
[Forms]![By Number]![Text4]
for some reason after the report is open, it just sayd #?nameor something like that, meaning that it is an invalid parameter.
what am i doing wrong?
Greetings,
I will certainly hope someone will be able to provide some enlightenment to my problem.
Currently, I have 2 joomla sites, layout and menus are a replicate of the other.
I noticed that on both Joomla, I will occasionally encounter "Unable to send mail" after a form submission.
Is this the fault of my server, or the fault of Joomla's PHP Mailer ? I will certainly love to approach my hosting company for a solution but I do not want to place a false accusation on them.
I need to split a list into a list of all possible tuples, but I'm unsure of how to do so.
For example
pairs ["cat","dog","mouse"]
should result in
[("cat","dog"), ("cat","mouse"), ("dog","cat"), ("dog","mouse"), ("mouse","cat"), ("mouse","dog")]
I was able to form the first two, but am unsure of how to get the rest.
Here's what I have so far:
pairs :: [a] -> [(a,a)]
pairs (x:xs) = [(m,n) | m <- [x], n <- xs]
Hi guys,
I've got a string that comes from a POST form where I want to replace all spaced with some other character.
Here's that I did:
$cdata = str_replace(" ","#",$cdata);
And I got this.
--- Contact-ID#=#148 [10274da8]#Sinhronizacija#=#private [1000137d]#Uzvards#=#Zom [1000137c]#Vards#=#Tana [1000130e]#Talrunis#=#3333 [1000130e]#Mobilais#=#5555
As you can see, spaced before "[10..." are still there. Any ideas what could be the problem?
I have a GridView bound to an DataSource query with parameters tied to form controls.
What is the standard / best-practices way to handle optional query parameters?
The application is simple, an HTML form that posts to a Perl script. The problem is we sometimes have our customers upload very large files (gt 500mb) and their internet connections can be unreliable at times.
Is there any way to resume a failed transfer like in WinSCP or is this something that can't be done without support for it in the client?
Hi,
I have 5 textfields for user input in a form namely:
username1, username2, username3, username4 and username5
I would like to know how should I write my php code such that I will be able to check if there is any duplicates between the 5 textfields during POST?
I can only think of comparing (username1 !== username2) and so on, but I think there should be simpler way to do it right? How should I be able to do it?
Thank you very much.