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?
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?
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:"
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?
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:
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 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.
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.
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?
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:
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.
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
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>
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.
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); }
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
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