.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
Easy Web
Imran Ghani
Post New Web Links

Symbol.Keyboard.KeyPad() object creation problem

Posted By:      Posted Date: September 03, 2010    Points: 0   Category :WPF
 
on windows mobile 6.5 application running on Windows mobile 6 professional VGA emulator. I am trying to work on keyboard functionality like function key press events. I have coded the below line.   Symbol.Keyboard.KeyPad keypad = new Symbol.Keyboard.KeyPad();   keypad.KeyStateNotify +=new Symbol.Keyboard.KeyPad.KeyboardEventHandler(keypad_KeyStateNotify); keypad.AlphaNotify +=new Symbol.Keyboard.KeyPad.KeyboardEventHandler(keypad_AlphaNotify);   Its build successfully but raising exception at runtime. please help me out to run this code on emulator. because i don't have device.


View Complete Post


More Related Resource Links

passing object values from server to client problem

  

I get a message that x_login is not declared.  I added Dim login as String = "123", but that didn't help.  What's the problem?

code behind....

Dim Login = "123"
x_login.Value = loginID


asp....

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Default.aspx.vb" %>

<!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" >
<body>
   
<form id="simForm" runat="server" method='post' action='https://test.authorize.net/gateway/transact.dll'>
        <input id="HiddenValue" type="hidden" value="Initial Value" runat="server" />
        <input type='hidden' runat="server" name='x_login' id='x_login' />
        <input type='submit' runat="server" id='buttonLabel' />
 </form>

</body>
</html>


 


Problem passing custom object returned by the same webservice among two separate projects

  
I am running into casting issue with this scenario: 1. I made a custom object lets call it EmployeeObject.  2. The Employee object is wrapped in the EmployeeWebservice.  3. I have a client application project lets call it EmployeeClientApplication and a class library called DoSomeWorkClassLibrary.  Both EmployeeClientApplication and DoSomeWorkClassLibrary reference the EmployeeWebService and need to be able to pass the EmployeeObject back and forth.  4. The EmployeeClientApplication also references the DoSomeWorkClassLibrary. 5. The employeeObject in the EmployeeClientApplication becomes EmployeeClientApplication.EmployeeWebService.EmployeeObject. 6. The employeeObject in the DoSomeWorkClassLibrary becomes DoSomeWorkClassLibrary.EmployeeWebService.EmployeeObject. 7. The DoSomeWorkClassLibrary has a method called DoSomeWork that takes an EmployeeObject. When I try to pass employeeObject from EmployeeClientApplication to DoSomeWorkClassLibrary by doing something like this: DoSomeWorkClassLibrary.DoSomeWork(EmployeeClientApplication.EmployeeWebService.EmployeeObject), I am getting Unable to convert EmployeeClientApplication.EmployeeWebService.EmployeeObject to DoSomeWorkClassLibrary.EmployeeWebService.EmployeeObject.  I have searched high and low to fix this issue, I have tried changing the namespace of the reference.cs file of the webservice in

problem with sitemap schema 'xsi:schemaLocation' in XML file creation

  
SqlConnection conn = new SqlConnection(connStr); conn.Open(); string sql = "select top 10 catnum,cast(case when isnull(onhand,0) < 5 then 0 else round((onhand/2),1) end as int) as onhand from dbo.V_OnHand with (nolock)"; SqlCommand cmd = new SqlCommand(sql, conn); XmlDocument doc = new XmlDocument(); XmlDeclaration dec = doc.CreateXmlDeclaration("1.0", "UTF-8", null); XmlElement rootNode = doc.CreateElement("inventory"); doc.InsertBefore(dec, doc.DocumentElement); rootNode.SetAttribute("xmlns", "http://seller.marketplace.tests.com/inventory/v1"); rootNode.SetAttribute("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"); rootNode.SetAttribute("xsi:schemaLocation", "http://sellersupport.domain.test.com/test1/s/schema/inventory/inventory-xml-feed-v1.xsd"); doc.AppendChild(rootNode); XmlElement fbm = doc.CreateElement("inventory"); doc.DocumentElement.PrependChild(fbm); SqlDataReader rdr1 = cmd.ExecuteReader(); while (rdr1.Read()) { XmlElement item = doc.CreateElement("item"); item.Set

Problem with listing records from table (object not found)

  
Hi everyone, I'm creating a website based on ASP.NET MVC 2 and SQL Server 2008 R2 Express for the database. After creating the table in database, I want to list all records in that table. For that, I use "scaffold'ing in ASP.NET to automatically generate the view file. But I encountered an error when loading that page. The error message was: [CODE] Server Error in '/' Application. Invalid object name 'dbo.Accommodations'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: Invalid object name 'dbo.Accommodations'. Source Error: Line 41:         </tr> Line 42: Line 43:     <% foreach (var item in Model) { %> Line 44: Line 45:         <tr> Source File: d:\MyProject\Views\Accommodation\Index.aspx    Line: 43 Stack Trace: [SqlException (0x80131904): Invalid object name 'dbo.Accommodations'.]    System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +2030802    System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +5009584 &n

Solution Deployment Problem (Administrative Framework Object Dependencies)

  
I'm having a problem with the deployment of a SharePoint workflow solution - hopefully someone can help me out.Here is the sequence of STSADM commands and their output from the console:C:\Workflows>stsadm -o deactivatefeature -name IL.SharePoint.Workflows -url http://localhost/ -forceOperation completed successfully.C:\Workflows>stsadm -o uninstallfeature -name IL.SharePoint.Workflows -forceOperation completed successfully.C:\Workflows>stsadm -o retractsolution -name IL.SharePoint.Workflows.wsp -localDeploymentSucceeded : server : The solution was successfully deployed.il.sharepoint.workflows.wsp: Operation completed with errors.C:\Workflows>stsadm -o deletesolution -name IL.SharePoint.Workflows.wspOperation completed successfully.C:\Workflows>stsadm -o addsolution -filename IL.SharePoint.Workflows.wspAn object in the SharePoint administrative framework, "SPSolutionLanguagePack Name=0 Parent=SPSolution Name=il.sharepoint.workflows.wsp", depends on other objects which do not exist.  Ensure that all of the objects dependencies are created and retry this operation.IL.SharePoint.Workflows.wsp: The Solution installation failed.Here is the related log info from the SharePoint logs:error-redacted.txtAs far as I can see, SP is attempting to insert a "SPSolutionLanguagePack" object into the configuration database, with an invalid foreign key reference

.NET Remoting Problem with Sponsor Renewal on CAO (Client Activated Object) Architecture

  
I have figured out a strange behaviour when using Client Activated Sponsorship and hope to get a hint from somebody who already got in touch with similar problems. The case is as follows: An Application is used by a server and a client. Both use (or try to use) the same objects after a user login. A lease of a session object on the server (serverSession) is initialised correctly with all of its regular remoting values in the lease for InitialLeaseTime (10) SponsorshipTimeout (5) RenewOnCallTime (10) In order to test the behaviour the values are set to seconds. It is easier to check the log every few seconds, than to wait some minutes until the Sponsorship Renewal call. If a client performs a login, the lease is according to its logged in state renewed each 10 seconds (or whatever the value is set to). So no problem so far. The lease will be alive as long as the client performs a logout, by the way it is used on a local network. Just compare the log (the renewal is firing every 10 seconds as expected): 2010-02-17 10:29:40.4338 Info Log5 SponsorObject:Renewal() 2010-02-17 10:29:50.4308 Info Log5 SponsorObject:Renewal() 2010-02-17 10:30:00.4328 Info Log5 SponsorObject:Renewal() 2010-02-17 10:30:10.4298 Info Log5 SponsorObject:Renewal() 2010-02-17 10:30:20.4318 Info Log5 SponsorObject:Renewal() 2010-02-17 10:30:30.4288 Info Log5 SponsorObject:Renewal() As soon as

Unable to cast object of type problem

  
hi I'm having a problem in this code: Public Function GetChannelList() As List(Of channel) Implements IChannelService.GetChannelList         Dim db As ChannelDataContext = New ChannelDataContext         Dim channelMatch = From channelRow In db.channels _                           Join parentChild In db.ChannelParentChildListings _                           On channelRow.channel_id Equals parentChild.parent_id _                           Order By channelRow.title Ascending _                           Select channelRow.channel_id, channelRow.title, parentChild.child,   parentChild.child_id           Return channelMatch    <-------- Error throw Unable to cast object of type 'System.Data.Linq.DataQuery`1[VB$AnonymousType_1`4[S

Dynamic Text Boxes Creation Problem

  
Hi all, I am creating 5 textboxes in a row. A new creates when user press enter in the last textbox. I have taken a hidden text field and in OnKeyDown of last textbox I am assigning the combination of last textbox Id with the table count  to the hidden field and in VB Code I am checking whether the tableCount + Last textbox Id is equal to the hidden field or not then only I am generating the new row. here is the code In JavaScript On KeyDown of remarks textfield. function funcNewRow(id,count,e) {    var e = event || evt;    var charCode = e.which || e.keyCode;    if(charCode == 13){      e = cancelKey(e);      htxtBox.value = id + count;    } }   In VB Page_load method calling getTableRow() method   if htxtBox.value = "remarks" & (Tbl.Rows.Count + ViewState("TotalClearedItems")) Then  Tbl.Rows.Add(GetTableRow(Tbl.Rows.Count + 1 + ViewState(Panel1.Controls.Add(Tbl))  Panel1.Controls.add(Tbl) htxtBox.Value = "" end if   Here I have to implement a clear functionality such as each row at last contains a check box when user click the check box and press clear button the checked rows have to deleted .   The clear button code as follows : cnt = CInt(Tbl.Rows.Count)  For i = cnt To 1 Step -1 c = Pag

Snapshot creation problem

  

Hello,

On  this code which has been provided by Alok I get an exception at the statement marked below. The exception message is also provided. The strangest thing is that the Snapshot IS created. The original DB is NOT read only but the snapshot is.

public void CreateSnapshotAlok ( string SourceDatabaseName )
        {
            ProvideSecurity.provideSecurity ( );
            DoServer.GetSrvConnOrSwitch ( "master" );
            /* This is to ensure that a database with same name does not exist which is not needed if one chooses unique name for snapshot each time.*/
            if ( Globals.srv.Databases[ SourceDatabaseName + "_Snapshot" ] != null )
            {
                Globals.srv.Databases[ SourceDatabaseName + "_Snapshot" ].Drop ( );
            }
  

Sending encrypted Querystring (with + Symbol) problem

  

I Sending a querystring value When it is encryped , I got the encypted value with +symbol

from vb.net code behind......



At that time The querystring contain link does not work properly....



How can i solve this issue..........????





ListBox object Binding Problem...?

  

hii guy's

i created a ListBox and i added Engine Class object into it...so i wana display Engine Class property "Name" into ListBox..so plz tell me how can i add property name of "Name" to ListBox of Class "Engine"

Thanks,

@nagaraju

 

 


Problem with xmlns when I convert object to XML and XML to object back

  

Hi, I am facing a strange problem.

I have a class object which I am accessing through webservice call.

Now actually that class has a property with type of Array inside that class and that array is the array of same class object. Means in reality, I have detailed tree structure as per how data gets fill up in that class object.

This is how my XML is and my actual code.

string xml_For_Obj = "";

                xml_For_Obj = "<xml version=\"1.0\" encoding=\"utf-16\">  ";
                xml_For_Obj += "    <ComponentObject xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">";
                xml_For_Obj += "        <BundledComponents xmlns=\"http://MySite.com/ISI/OtherWebService/Components\">";
                xml_For_Obj += "            <ComponentObject>";
                xml_For_Obj += "                <SKU>Test Sku Name</SKU> ";
                xml_For_Obj += "                <SubGroup>Test SubGroup</SubGroup> ";
                xml_For_Obj += "                <Quantity>70</Quantity> ";
                xml_For_Obj += "                    <BundledComponents >";
  

ListBox Object Binding Problem..??

  

hii guy's here i'm having small problem on Object DataBinding using ListBox.. i've a WCF class like..


[System.Runtime.Serialization.DataContract]    
	public class EngineInstanceStatus 
	{
             public string Name
		{
			get
			{
				return m_name;
			}
		}
       }

so i wana add dis class object to my ListBox.. den it'll display its property name "Name" in ListBox whenever i added this class object ot ListBox..


so plz tell me with sample how can i do this one..


Thanks,

@nagaraju


Problem in binding List<> object to Gridview

  

Dears,

We I bind a list<> object to a gridview it calls an error like this:

Error: DataBinding: 'Default2+JobsList' does not contain a property with the name 'JobId'

Hear is my markup Codes:

<asp:GridView ID="GridView1" runat="server" DataKeyNames="JobId" AutoGenerateColumns="False"
                            OnRowCommand="GridView1_RowCommand">
                            <Columns>
                                <asp:BoundField DataField="JobName" .../>
                                <asp:BoundField DataField="JobExplain" .../>
                                <asp:ButtonField CommandName="DeleteJob" .../>
                            </Columns>
</asp:GridView>


and Code behind:

public struct JobsList
    {
        public int JobId;
        public string JobName, JobExplain;
        public JobsList(int id, string name, string explain)
        {
            JobId = id;
            JobName = name;
            JobExplain = explain;
        }
    }

List<JobsList> list = new List<JobsList>();

....

list.Add(new JobsList(Approperiate Attributes..));
GridView1.DataSource = list;
GridView1.Data

XMLSerializer Problem on typcasting a deserialized object

  

Hi,

I have little understanding problem with XMLSerialiyer.

It seams to be the way, that a serialized object can not be deserialized again if serialization and deserialization are called fromassemblies which are identical, but physically located on different paths. The following code shows the deserialization:

using (FileStream fs = new FileStream(settingsPath, FileMode.Open))
{
    XmlSerializer serializer = new XmlSerializer(typeof(MySettings));
    object o = serializer.Deserialize(fs);
    instance = o as MySettings;
}

The strange part is, that the object o shows all the properties of the MySettings class (in the debugger), but when I try to assign "o as MySettings" to instance instance stays null . So actually the deserialization seems to work, but the typcasting not.

Every thing works fine as long as it is the same application that created the xml file deserializes it. But in my case, where I wrote a test, using the same assemblys (partially loaded at runtime) then the application later on will show the described faulty behaviour.

What could be the cause to my problem?

Regards
Rainer

 


XMLSerializer Problem on typcasting a deserialized object

  

Hi,

I have little understanding problem with XMLSerialiyer.

It seams to be the way, that a serialized object can not be deserialized again if serialization and deserialization are called fromassemblies which are identical, but physically located on different paths. The following code shows the deserialization:

using (FileStream fs = new FileStream(settingsPath, FileMode.Open))
{
    XmlSerializer serializer = new XmlSerializer(typeof(MySettings));
    object o = serializer.Deserialize(fs);
    instance = o as MySettings;
}

The strange part is, that the object o shows all the properties of the MySettings class (in the debugger), but when I try to assign "o as MySettings" to instance instance stays null . So actually the deserialization seems to work, but the typcasting not.

Every thing works fine as long as it is the same application that created the xml file deserializes it. But in my case, where I wrote a test, using the same assemblys (partially loaded at runtime) then the application later on will show the described faulty behaviour.

What could be the cause to my problem?

Regards
Rainer

 


WPF problem binding to an object

  

Hi: I'm having a problem binding to an object I create. I'm a newbie to WPF.  Here's my Visual Basic code, followed by my XAML.  The code runs with no errors, but nothing appears in the Label1, when I expected to see the FirstName "Shirley".  What am I doing wrong?  Thanks,  Al

Imports System.Windows

Class MainWindow
  Public Class Person
    Public FirstName As String

    Public Sub New(ByVal fName As String)
      FirstName = fName
    End Sub
  End Class

  Private Sub Window_Loaded(ByVal sender As System.Object, ByVal e As Syste
Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend