C# - Extending System.String For Custom EditTemplate (Ajax) Implementation

Sep 29, 2011

This is the following. Normally, when i have a city, i'm using some javascript to autocomplete the cities as the user type. Now i want it to make it automaticly, using the edittemplate. So i would change :

[Code]...

View 2 Replies


ADVERTISEMENT

Our App Uses: ASP.Net, .Net, And Microsoft's AJAX Implementation?

Mar 3, 2011

The middleware that manages talk between the mainframe and our app is blowing up randomly. It's a "such and such attempted to read/write protected memory..." error.The vendor is saying there we must be running some unmanaged code (I feel they're trying to worm out of it). I know VB's entirely managed, but does anyone know about the server portion of AJAX? Is there any server side javascript stuff that occurs before it actually gets into the .NET framework?

View 1 Replies

Extending Or Creating A Custom Vb Component?

Jan 11, 2010

I am wondering if I can extend a component (e.g a button ) in vb the same way I can in java which enables you to modify the component for your specific requirement or create a new one from scratch.

View 3 Replies

Extending System.Collections.Generic.List(Of T)?

Jan 27, 2010

imagine i want to add an extension method to System.Collections.Generic.List(Of T)

let's say i want to give it .GetUBound which returns Count-1

View 7 Replies

C# - Custom SNMP Trap Implementation In .Net?

Oct 2, 2009

I need to create a monitoring mechanism using SNMP (in .Net). I think we'll be using an nsoftware component to handle most of the work. It appears we must use 'traps' to communicate from the agent to the server. We'll have a number of different traps and various information detailing each trap. What is the best way to implement custom traps? That is, what is the best way to not only send a trap, but also send the information describing the trap to our 'snmp manager'? I think this is done through "variable bindings". To use "variable bindings" do we need to create our own "enterprise number" and use an "enterpriseSpecific" trap? Should we implement our own, custom MIBs or can we just send the data we need with the trap (via variable bindings)?

View 2 Replies

Custom Event - Invocation List Implementation Considerations

Apr 9, 2010

I'm looking for some pointers on implementing Custom Events in VB.NET (Visual Studio 2008, .NET 3.5). I know that "regular" (non-custom) Events are actually Delegates, so I was thinking of using Delegates when implementing a Custom Event. On the other hand, Andrew Troelsen's "Pro VB 2008 and the .NET 3.5 Platform" book uses Collection types in all his Custom Events examples, and Microsoft's sample codes match that line of thought. So my question is: what considerations should I have when choosing one design over the other? What are the pros and cons for each design? Which of these resembles the inner-implementation of "regular" events?

Below is a sample code demonstrating the two designs.
Public Class SomeClass
Private _SomeEventListeners As EventHandler
Public Custom Event SomeEvent As EventHandler
AddHandler(ByVal value As EventHandler)
_SomeEventListeners = [Delegate].Combine(_SomeEventListeners, value)
[Code] .....

View 2 Replies

Implementation - Loop To Update Properties Of Each Object Of A Set Of Custom Objects

Jan 4, 2010

I am using a loop to update properties of each object of a set of custom objects. The routine knows which controls to update because the controls value is not empty, I don't want the routine setting the corresponding properties to nothing when the control is empty. Now I know how to do this perfectly fine with IF statements such as:

CODE:

But this feels really redundant doing that same IF block over and over for each property/control combination, I thought about creating a separate routine that takes the control as an argument and does all the repetitive IF blocks but I don't know how I could also pass an object property to tell the routine to update that particular property.

View 1 Replies

Load A User Control In An Ajax WCF Service And Access Custom Properties?

Apr 4, 2011

I can load a generic user control just fine in my WCF service doing the following:

UserControl userControl= (UserControl) new Page().LoadControl("~/UserControls/MyControl.ascx");
However i can't seem to find any way to do this

[code].....

View 2 Replies

VS 2008 Singleton Factory Implementation - Is Pattern Implementation Right

Mar 18, 2010

So I've been doing some research on the singleton factory design pattern, and I am wondering if my example implementation is correct (warning I did get carried away creating animals):

[Code]...

View 6 Replies

.net - Can't Return Dictionary(Of String, String) Via GET Ajax Web Request, Works With POST

Jun 23, 2009

I have the following web method:

<WebMethod()> _
<ScriptMethod(ResponseFormat:=ResponseFormat.Json, UseHttpGet:=True, XmlSerializeString:=True)> _

[Code].....

I wanted to use HttpGet here so that the result can be cached.

I tried every variation of calling this, but no luck. Is this possible with GET?

View 2 Replies

Inherit System.Type - Extending Type Class - Various

Jan 15, 2010

i was trying to inherit System.Type. this is what i have:

[Code]...

and anyway the real problem is that inheriting System.Type without declaring my derived class as 'MustInherit

View 9 Replies

Conceptual / Rule Implementation / String Manipulation

Dec 29, 2011

So I'm working on a software in VB.Net where I need to scrape information and process it according to rules. For example, simple string replace rules like making "Det" into "Detached" for a specific field, or a split/join rule, basic string operations. All my scraping rules are RegEx and I store them in a database in rows of rule sets for different situations.What is the best way behind creating/storing rules to manipulate text? I do not want to hardcode the rules into the software, but rather be able to add more as there will be a need for them. I want to store them in a database, but then how do I interpret them?

View 1 Replies

Asp.net - Get The Cascading Dropdownlist To Work In A Gridview Edittemplate Fields?

Sep 14, 2011

Error is ddlgvRooms' has a SelectedValue which is invalid because it does not exist in the list of items.Parameter name: value

I read a lot of people having issues with this particular problem but non of the fixes have worked for my case.I have tried a few different things such as setting appenddatabounditems="true" also tried to set in the itemcollection a default null value.Most of the forums post on this that I read were from a couple years ago im hoping they fixed this bug already and I am just overlooking something.I am trying to get my cascading dropdownlist to work in a gridview edittemplate fields. I created these in my detailsview on insert everything works great.

MySetup Basically I have a webmethod that has 2 functions getRooms and getJacks that are supposed to grab the data from the 2 datasets that I have created.The Datasets get their data from a couple of SQLSTOREDPROCEDURES.My aspx page dropdownlist and AjaxCDDL looks like this

<EditItemTemplate>
<asp:DropDownList ID="ddlgvRooms" runat="server"
SelectedValue='<%# Bind("intRoom") %>'>

[code]....

View 4 Replies

Unable To Cast Object Of Type 'System.String' To Type 'System.Predicate`1[System.String]

May 13, 2009

I am getting the following erro message: "Unable to cast object of type 'System.String' to type 'System.Predicate`1[System.String]'." on the line of code: If Not StrgFrag.Exists(wrd) Then I was expecting a True/False response and assumed it would work given that wrd is a String variables and StrgFrag in a List(of String). Do I need to reference the wrd variable differently? Dim StrgFrag As New List(Of String)

[Code]....

View 2 Replies

Value Of Type 'System.Func(Of String, String)' Cannot Be Converted To 'System.Convert

Feb 17, 2011

Value of type 'System.Func(Of String, String)' cannot be converted to 'System.Converter(Of String, String)

Why? They are both effectively a function pointer (or delegate?) to a function that accept a string and return a string.

View 6 Replies

VS 2008 : Error - Cannot Perform 'Like' Operation On System.Int32 And System.String"

Nov 2, 2009

I'm trying to use DataView.Rowfilter and I'm getting an exception which says "Cannot perform 'Like' operation on System.Int32 and System.String".

Here's the code...

Dim str2 As Double = CDbl(searchSTR)
Me.shipperDV.RowFilter = fieldName & " LIKE '*" & str2 & "*'"

View 7 Replies

DB/Reporting :: Error: Cannot Perform '=' Operation On System.Int32 And System.String

Mar 6, 2010

I wrote the code below which calculates the length of a line on the form and save record. An error occurs when the programme tries to save the record. It gives me "Cannot perform '=' operation on System.Int32 and System.String" error. I checked the data type of "ID"(int), "Microscope"(Varchar), "Magnification"(int) and "Calibration"(Decimal), and they are fine so far as I know.

Code:
Private Sub btnEnd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnEnd.Click
'Check if the length textbox is not empty

[Code].....

View 4 Replies

Cant Count System String - Evaluate Exception Unhandled "Cannot Perform '=' Operation On System

Nov 3, 2009

Here is the code I am working with, everything works fine up until last line then i get evaluate exception unhandled "Cannot perform '=' operation on System.Int32 and System.String." My eyes are going blind trying to figure out whats wrong, if I understand correctly it cant count system string and REO is a string value.

The thing i have done this before ,count that is. I know you cant average strings and some other function but i have been able to count.

d Dim comm As New OleDb.OleDbCommand("Select * From " & Me.OpenFileDialog1.SafeFileName & " Where Status <> 'S'", con)
Dim dalist As New OleDbDataAdapter(comm)
Dim comm1 As New OleDbCommand("SELECT * FROM " & Me.OpenFileDialog1.SafeFileName & " Where Status

[CODE]...

View 14 Replies

Play With List Of List Of String With Javascript Or Jquery Using Ajax?

Dec 5, 2011

We're working on a big ASP.NETVB.NET website project. I need to populate three dropdownlists. To last two are independent of the previous ones. The population data comes from an SQL Server. I'd have no problem doing this with code-behind with post back but we don't want any PostBacks so I started to develop this in AjaxjQuery.

[Code]...

View 1 Replies

Cast A System.string To System.windows.forms.form?

Feb 23, 2009

I want to cast a system.string to system.windows.forms.form

View 2 Replies

Extend Primitive Types Such As System.String And System.Int32?

Jul 25, 2010

Is it possible to extend primitive types such as System.String and System.Int32 (IE: integer) in .Net 4 and if so how?

To be more specific, I am aware of the concept of partial classes but this doesnt seem to be the answer. Also I find that System.String is not inheritable and Int32 is a structure.

Lastly I am interested in knowing both a VB.Net and C# answer to the above question.

View 2 Replies

System.Int32 Cound Not Be Cast To The Type Of System.String?

May 27, 2011

Imports System.Data
Imports System.Data.SqlClient
Imports System.Data.Sql Partial Class _Default

[code].....

View 5 Replies

Cannot Perform '=' Operation On System.String And System.Int32

Jan 27, 2009

For this code, I'm trying to have it pull the ID of the doctor from the database and only show their patients. I keep getting this error when I try selecting one from the list though, right at the red section.

[Code]...

View 3 Replies

Cannot Perform '=' Operation On System.String And System.Int32

Nov 4, 2010

I get an error "Cannot perform '=' operation on System.String and System.Int32" on the following code:

VB.Net Code:

Public Sub board2_OnGameWon(ByVal sender As Object, ByVal e As EventArgs)
If Not board2.isCheated() Then
Dim time As Integer = board2.getGameTime()' I have tried changing this to String

[code]....

The exception is in the lines where I 'Dim betterScores' above. The idea is that when the player wins a game their score is placed and held in the betterScore variable. It is then written to an xml file later on.

I have a Difficulty Menu item (System.Windows.Forms ToolStripMenuItem) containing 4 choices, 3 of them work but one doesn't. The one that doesn't work is "1.0 (Normal)" and in the Sub New is "adjustDifficulty(mnuDifficulty100)"I have copied some other subs that are associated with this code below.

VB.Net Code:

Public Sub New()
' This call is required by the Windows Form Designer.
InitializeComponent()

[code]....

View 5 Replies

How To Make Custom System Tray

Dec 15, 2008

here a way in VB2005/2008 to list all the apps in the systray and nothing but them. I can list all the windows by theyre hwnd, but it also shows the taskbar windows and windows not even shown anywhere in windows.So I need to somehow list all the systemtray icons in a listbox.If something's not clear,

View 8 Replies

.net - Custom Attribute Parameter Of System.Type?

Feb 19, 2012

I'd like to auto-register the common/simple services in my unity container. I think the cleanest way to do this would be via a custom atribute.I can then examine all the (abstract) classes in an assembly and register those types with unity.The piece of information I'm missing is the interface(s) that the class wants to be registered against

eg:

Public Class AutoRegisterAttribute
Public Property ForInterface As System.Type
Public Sub New(ForInterface As System.Type)

[code]....

Note, I don't just want to find any class it implements as shown with IDisposableI've tried doing this using generics (generics can't inherit from Attribute), with a Type Parameter (Passing in IEngine.GetType results in a "Constant expression is required")

View 2 Replies

Add Custom Currency Sumbol That Is Not In The Windows System?

Dec 23, 2009

I want to add a custom currency symbol, which windows system does not have. How can I add it to my program ? I want to put it in front of numbers in a text box. Below is the image link, since it is hard to add image in msdn.

View 6 Replies

C# - Specify Custom DNS Server When Downloading Using System.Net.WebClient?

Mar 26, 2011

I'm trying to filter submitted web sites by attempting to browse them while bouncing the request off of OpenDNS. If the page received is the OpenDNS page, I'll assume the page shoudld be blocked.

How might I accomplish this task using the System.Net.WebClient class?

View 1 Replies

Can't Convert System.string To System.string

Sep 1, 2010

This should be an easy one. Basically I've been getting an error saying that it can't convert System.string to System.string[]. I just want to know some details about system.string[]. I can't find any on Google because it strips out symbols.

View 5 Replies

Create Custom Exceptions To Inherit From System.Exception?

Jan 16, 2010

Is the only way to create custom exceptions to inherit from System.Exception?

I wish to create a class that can be thrown as an exception but i do not wish to inherit from System.Exception because i have a base [Object] class in my library which all my classes should inherit from and i wish my custom exception class could also inherit from it.

View 6 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved