Private Function Does Not Working?

Jul 23, 2010

private void Form1_Load(System.Object sender, System.EventArgs e)
{
Dim stri As String
stri ="SELECT allowType fROM SLABS order by allowtype"
this.FillCombo(stri, Cmballowa);
}
private void FillCombo(string ssql, object cbo)
{
SqlDataAdapter da = default(SqlDataAdapter);
SqlConnection con = new SqlConnection();
DataSet ds = null;
DataView dv = null;
con = new SqlConnection(constr);
da = new SqlDataAdapter(ssql, con);
ds = new DataSet();
da.Fill(ds, "ITEM");
dv = ds.Tables("ITEM").DefaultView;
cbo.DataSource = dv;
}

But here some error message is coming in "private FillCombo function" like "'object' does not contain a definition for 'DataSource' and no extension method 'DataSource' accepting a first argument of type 'object' could be found (are you missing a using directive or an assembly reference?)" So, how can i correct this error?

View 1 Replies


Similar Messages:

Web Forms :: How To Call A Private Function Entering The Textbox

Jul 29, 2010

I want to call a private function entering the textbox (enter key). How to fix it with vb.net?

View 3 Replies

Window.open Javascript Function Is Not Working In Mozilla, But Working In Other Browsers

Mar 18, 2010

Window.open javascript function is not working in Mozilla, but working in other browsers, here is what I have write.

<a href="javascript:window.open('../Terms.aspx','Terms','width=550,height=400')">
click here</a>

Actually what happened in Mozilla is popup is opened but parent window is blank with [object Window]

View 2 Replies

Iis - Execute A Dll Function In Bin Not Working?

Apr 24, 2010

I am developing a remote control application where a client (aspx page in a browser) can request a server to "launch a notepad" (for testing purpose, for real life, turning off a light bulb, etc). So I created a dll with a simple function for launching the notepad (on the server side) and dropped this dll in the root bin folder.

It worked fine when the aspx page is running under ASP.NET development server (launched from Visual Studio). But when I tested the same aspx page under a FireFox browser, it did not work (launch the notepad) even though it did call for the same function (I stepped through in debugger).

Is this a permission issue? How do I set this up in IIS manager, or even better in web.config?

View 2 Replies

Javascript - C# Function Is Not Working?

Apr 4, 2011

if (e.Row.RowType == DataControlRowType.DataRow)
{
// if no link are presen the cell,

[code]...

View 4 Replies

MVC :: Blur Function Not Working?

Jan 1, 2011

jquery "blur" function not working in my MVC 2 NerdDinner app

Background:

When I click my 'Host a Meeting' tab then insert an address into the 'Address' field then tab out, nothing happens. I currently have to manually insert the Latitude and Longitude >>> save the meeting >>> then click edit in order to have the map actually load the pin.

As per the following paragraph (from ScottGu's tutorial) I'm supposed to be able to simply "tab out of the 'Address' field" to load the map with the appropriate location: "When we type in an address, and then tab away, the map will dynamically update to display the location, and our event handler will populate the latitude/longitude textboxes with the location values:"


Code:

MVC 2
jquery-1.4.4.min.js

DinnerForm.ascx:

[Code]....

Map.ascx:

[Code]....

Map.js:

[Code]....

View 2 Replies

JQuery Function Is Not Working After URL Rewriting

Mar 24, 2011

Refer to my this question: Page not redirecting properly, URL rewriting (Asp.NET)

Which is resolved except one thing.

Though I have put the code to eliminate post back for .jpg and other file extension, JQuery at the web page is not working.

<script type="text/javascript" src="JS/jquery.js"></script>

I have written it like the above. I have tried to change the path like

<script type="text/javascript" src="~/JS/jquery.js"></script>

View 2 Replies

C# - Javascript SetInterval Function Not Working

Mar 19, 2010

I want to call a function for every half minute. i am using the following code. The function is not getting triggered.

Code:

window.setInterval('progress()', 10000);

View 2 Replies

TextChanged Event Function Not Working?

Feb 17, 2011

I have a simple aspx file

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="test4.aspx.vb" Inherits="test4" %>
<!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="form1" runat="server">
<div id="content">
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<br />
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
</div>
</form>
</body>
</html>

And this is the test4.aspx.vb code file

Partial Class test4
Inherits System.Web.UI.Page
Protected Sub TextBox1_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
TextBox2.Text = TextBox1.Text
End Sub
End Class

Now the problem is that even if i type something in the textBox1 the textchanged event if not firing why?

View 3 Replies

Generic List - Remove Function Not Working

Feb 9, 2010

I have a generic list which contains a class called Parameter. Parameter contains 2 integers, ParamType and ParamValue. A generic list is built containing a small number of values List<Parameter> myList I have created a function which passes in 2 parameters. These are passed individually but are used to create a new Parameter within the function. The Parameter is tested against myList, and if it is found removed. In order to do this I have used the remove function, the syntax being:

myList.Remove(new Parameter(ParamType, ParamValue));

The remove isn't working and at present I'm using LINQ to do it.

View 2 Replies

Check Box Select All Function Is Not Working In Safari?

Oct 8, 2010

I am using a check box to select and unselect all the rows

in a grid using the javascript. this is working fine in IE but its not working in safari

View 2 Replies

Jquery Click Function Is Not Working In Code

Jul 12, 2010

[code]....

this is my webform design code..

click function wat written in side script tag is not working... Anything wrong.?

View 5 Replies

Javascript - Why ClientValidationFunction Function Is Not Working Properly

Jan 29, 2011

javascript - Why ClientValidationFunction function is not working properly

<script type="text/javascript">
function clientValidation(sender, arguments)
{
if (arguments.value == "hello world")
arguments.isvalid = true;
else
arguments.isvalid = false;
alert(arguments.isvalid);
}
</script>
<asp:Label ID="lblName" runat="server" Text="Enter Your Name" />
<asp:TextBox ID="txtbxName" runat="server" />
<asp:CustomValidator ID="CustomValidator1" runat="server" ErrorMessage="You are Not allowed" Display="None" ClientValidationFunction="clientValidation" ValidationGroup="ValidationSummary1" />
<br />
<asp:Label ID="lblClass" runat="server" Text="Class" />
<asp:TextBox ID="txtClass" runat="server" />
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="Please enter Clas" ControlToValidate="txtClass" Display="None" ValidationGroup="ValidationSummary1" />
<br />
<asp:ValidationSummary ValidationGroup="ValidationSummary1" ID="ValidationSummary1" runat="server" />
<br />
<asp:Button ID="Button1" runat="server" Text="Validate" ValidationGroup="ValidationSummary1" />

View 1 Replies

Calling Jquery Function From Ascx Not Working?

Jun 11, 2010

I have an ascx which contains a submit button for a search criteria and I am trying to call a validation function in a js file I've used throughout the site (this is the first time I'm using it in an ascx).

Now I've just tried this:

<script type="text/javascript" src="js/jquery-1.3.2.js"></script>
<script type="text/javascript" src="js/jsAdmin_Generic_SystemValidation.js"></script>
<script type="text/javascript">
$(document).ready(function () {

[Code]....

Now at first I was getting "Validate() is not a function" in firebug. Since I did that alert testing, I am getting the first alert, then nothing with no errors.

View 1 Replies

Window.open Function In HREF TAG Not Working?

Feb 2, 2011

I am trying to open popup using window.open finction but somehow it's not working ... well below is the code

string properties = "left=250px, top=245px, width=700px, height=450px,scrollbars=yes, status=yes, resizable=yes";
TableCell cell = new TableCell();
cell.Text = "<a href="javascript:void(window.open('details.aspx?node="+node+"','"+properties+"'))">" + "View Details</a>";

But his is not working. While clicking the anchor tag getting javascript error "Invalid argument".

View 1 Replies

Javascript - History.go(-1) Function Not Working For Dropdown?

Dec 30, 2010

i am using the function history.go(-1) function on my button to go back. but i am getting a prob in value selected in dropdown.

the sourceview is showing the original value selected but on UI its showing the previous value

means when i click on back button,

UI shows the same value but when i view the source code then the selected value is the same that need to be appear

for example

suppose my dropdown has data in format MM/YYYY first i select 02/2010 and then after that i select 04/2010 now when i click on back button having onclick ="history.go(-1)"

then the value in dropdown remains the same i.e 04/2010 but when i see the source code, then for dropdown the selected value shows as 02/2010.

View 1 Replies

Web Forms :: Header Modifications Not Working In A Function?

Mar 31, 2010

I have the function below that runs fine until I add some header modifications to it. If I comment out the code in the "finally" everything works fine. Shouldn't the "finally be the last thing that runs?

[Code]....

View 1 Replies

Web Forms :: Function In Javascript Included File Is Not Working?

Jul 27, 2010

I am using mixed validation i.e. dot net controls validation and javascript validation. Javascript(js) function is 'hpVali()'. It is working when coding javascript within aspx page's head section. but when i moved it in a js file. It stoped working.

I have used the script to register/add js file in aspx.cs file as:

[Code]....

View 6 Replies

AJAX :: Simple Javascript Function Not Working In Firefox?

Aug 5, 2010

I have a simple js function that counts down the characters in a text box, and it works in every browser EXCEPT Firefox (3.6.6). I've tried changing some syntax, but nothing has worked so far.

[Code]....

View 8 Replies

Web Forms :: Dynamic Buttons Click Function Not Working?

Jan 31, 2011

the buttons are created fine, when i click a button i get my javascript alert, but my labels arent updated, its like the serverside function isnt running it at all

the "SetTemplateContent" section the aspx section is at the bottom if that helps

whats up with the code that would be great, cheers

[Code]....

View 1 Replies

C# - ASPX FormsAuthentication.RedirectFromLoginPage Function Is Not Working Anymore

Mar 23, 2010

I have an ASPX web site and I have code in there to redirect from the login page with the call to

"FormsAuthentication.RedirectFromLoginPage(username, false);" This sends the user from the root website folder to 'website/Admin/'. I have a 'default.aspx' page in 'website/Admin/' and the call to redirect works on a previous version of the website we have running currently, but the one that I am updating on a separate test server is not working. It gives me the error "Directory Listing Denied. This Virtual Directory does not allow contents to be listed." I have this in the config file:
<authorization>
<allow users="*" />
</authorization>

under the "authentication" option and...

<location path="Admin">
<system.web>
<authorization>[code]....

for the location of Admin.Also, there is no difference in the code between the web.config, Login.aspx, or the default.aspx files on the current server and the one on the test server, so I am confused as to why the redirect will not work on both. It even works in the Visual Studio server environment, for which the code is also identical.

View 1 Replies

JQuery :: BeginRequest And EndRequest Function Not Working Anymore

Jan 25, 2011

Are beginRequest and endRequest working while sending and retrieving data with jquery? In my observation these functions (see below) are not working anymore. Is this because it's not a real postback?

function pageLoad(sender, args) {
Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(beginRequest);
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(endRequest);
}

View 1 Replies

AJAX :: Javascript Function To Restrict Input On Textbox Not Working In IE7

Mar 26, 2010

I use the following javascript function to restrict the input in textbox

[Code]....

My textbox is appears as below

[Code]....

It is working perfect in FireFox,Chrome,IE6 but it is not working in IE7 Inside my javascript all conditions are working fine in IE7 but it is not restricting the input

View 3 Replies

AJAX :: Init Function Is Not Working After Partial Post Back?

Mar 6, 2010

im using a init function after partial postback again the init function is not calling.

<asp:ScriptManager runat="server" ID="MainSM" EnablePartialRendering="true">
<Scripts>
<asp:ScriptReference Path="~/JS/menu.js" />
</Scripts>
</asp:ScriptManager>
<script type="text/javascript">
menu.init("class");
</script>

this script works fine but after partial postback again this init function is not working. So i searched in google i found some articles regarding this [URL]

<script type="text/javascript">
function pageLoad() {
// Initialization code here, meant to run once.
</script>

this works fine when it was postback,but without postback this init function is not working

View 4 Replies

Web Forms :: Adding Button & OnClick Function In Aspx.cs Page Not Working

Oct 30, 2010

public void addComment(object sender, ImageClickEventArgs e)

View 4 Replies







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