Error While Checking Url - Key Can't Be Null
Sep 14, 2010
.NET noob here (as in I know next to nothing, I'm trying to pick up some of the scraps left by my developer). Ok, I am getting this error on a number of my .aspx pages: Error while checking url '/': Key cannot be null. Parameter name: key Interestingly, I get this on my homepage on which the only .NET code is in the form of two includes, e.g: <% Response.WriteFile("/includes/footer.aspx") %> These includes in themselves only contain HTML, so I assume the issue can only be related to these or a configuration issue?
View 4 Replies
Similar Messages:
Oct 19, 2010
How do i check for empty array?
If I write
If Not ls_filename.Length = 0 then
....
End If
I get object refernce set to null error
View 4 Replies
Jan 28, 2010
protected void rptNavigation_ItemDataBound(object sender, System.Web.UI.WebControls.RepeaterItemEventArgs e){
if (!((e.Item.ItemType == ListItemType.AlternatingItem) || (e.Item.ItemType == ListItemType.Item)))
{return;
}string Name = string.Empty;
if (IsDBNull(e.Item.DataItem["FullName"])) {
Name = String.Empty;}
else {Name = (string)(e.Item.DataItem["FullName"]);}
Literal ltlLiteral = (Literal)(e.Item.FindControl("ltlLiteral"));
ltlLiteral.Text = Name.ToString();
I get error for IsDbNull - Error 1 The name 'IsDBNull' does not exist in the current context. What's the best way to check for null values returned from db? also I get errors on both lines where (e.Item.FindControl(ltlLiteral")); is present ERror: Cannot apply indexing with [] to an expression of type 'object'
View 12 Replies
Jan 23, 2011
I am making a class with an optional paramiter which will be a List<> paramiter. I want to set it's default value to null so I have used List<Params> Param = null. What am not 100% sure is checking the list to see if it was set to null or not. Is using:
if (Param == null)
View 4 Replies
Feb 10, 2011
Is it best practice to check whether a value is null coming from a database even though there are constraints on the column which disallow nulls.
View 3 Replies
Feb 16, 2011
I use the following code to get the file name out of the URL.
[Code]....
This works fine if there is actually a page that shows up after a '/', I would also like to check for when there is nothing showingup after the '/'. My alert above shows nothing to be there, but how do I chack for the nothing. I have tried the folloiwng, but for some resaon it just ignores me. If I do an if statement, it doesn't pick up that there isn't anything there.
if (sPage = '') { alert(sPage);}
Even though there isn't anything there, it won't show the alert and acts as if there is actually something there.
View 1 Replies
Feb 20, 2011
Is there one simple test that a person can do that covers all options where there could be a null, or "" value. When I google, I see so many options. I see:
if txtBox1.text IsNot nothing
if txtBox1.text.toString isNot nothing
if txtBox1.text <> ""
if txtBox1.text.toString <> ""
if isNull(txtBox1)
Is there on test that can cover them all?
View 10 Replies
Feb 11, 2010
Is there a cleaner way to check for a null value comming from the database?
Right now i am doing this
[Code]....
There has to be a better what than doing this on every row which could possibly be null
View 3 Replies
Jan 27, 2011
checking for null on aspx page
[Code]....
View 4 Replies
Jan 31, 2010
I have uploaded all files to my server. and while im checking the site it shows the following error." Server Error in '/' Application. Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster,ensure that <machineKey> configuration specifies the same validationKey"what i have to do/how to fix it.
View 3 Replies
Jul 9, 2010
I have a FormView that is loaded with a records from my DB. Some of the fields may be blank or null. I am trying to check the value of some of the text boxes to verify that the user has updated the fields prior to allowing a DB update from the Edit Template.
I can not seem to get the correct syntax on the if statment to check the value of the text box....
[Code]....
View 6 Replies
Feb 8, 2010
I have the following line of code:
[Code]....
If I submit the page.. and no radio buttons were selected I get an error that 'object not set to an instance' is there a 'quick and easy' way to say ... if 'NO ITEMS WERE SELECTED' .. skip this... basically.. IF NULL... skip?
View 3 Replies
May 17, 2010
m getting this error again and again. i m also using the ajax modalpopup extender in my page ..
View 3 Replies
May 13, 2010
My site was woking fine, now i noticed that i get an error "Microsoft JScript runtime error: 'null' is null or not an object" when i checked the view source, i saw the following system generated code
<script type="text/javascript">
var Page_ValidationActive = false;
if (typeof(ValidatorOnLoad) == "function") {
ValidatorOnLoad();
function ValidatorOnSubmit() {
if (Page_ValidationActive) {
return ValidatorCommonOnSubmit();
}
else {
return true;
}
WebForm_AutoFocus('txtMailAddress');// --> IS THIS RIGHT???? out side the braces???
</script>
</form>
</body>
</HTML>
and a reference to this line below
<IFRAME id="__hifSmartNav" name="__hifSmartNav" style="display:none" src="/m2qa/WebResource.axd?d=fvL5WUdiCo1B4KvdiJfkfg2&t=633546432952161750"></IFRAME>
View 3 Replies
Mar 31, 2011
I have an asp:BulletedList controls with AJAX:PagingBulletedListExtender on my aspx page.
It gives error as: Microsoft JScript runtime error: Sys.ArgumentException: Value must not be null for Controls and Behaviors. Parameter name: element
If I removed, the asp:BulletedList controls and AJAX:PagingBulletedListExtender from my page then page run without any error.
I am not getting the cause of the error.
View 3 Replies
May 21, 2010
I am building an asp.net application, using II6 on windows server 2003 (vps hosting).
I am confronted with an error I didn't receive on my development machine (windows 7, iis 7.5, 64 bit).
When my wcf service tries launching my query running against a local sql server this is the error I receive:
Memory gates checking failed because the free memory (43732992 bytes) is less than 5% of total memory. As a result, the service will not be available for incoming requests. To resolve this, either reduce the load on the machine or adjust the value of minFreeMemoryPercentageToActivateService on the serviceHostingEnvironment config element.
View 1 Replies
Mar 20, 2010
Modal not showing up when show is called, also error on loading page. Attaching code below, can anyone help me discover my syntax / logic issues here?
NOTE: Did some research on this before posting, some claimed it can be an issue of where the modal is placed on the page in relation to the update panel I am using. I have tried different placements of the modal extender and I also tried removing the update panel all together in hopes to at least see the modal show, no go...same issue. So with that, the issue shouldnt be around the use of the update panel...
Here is the error:
icrosoft JScript runtime error: Sys.ArgumentNullException: Value cannot be null.
Parameter name: elements
and the code...
View 2 Replies
Nov 28, 2010
I have a table called category that has tow attribute (Cid,Name)
what can i do to insert category name only without allow user to insert category id in my webpage, I use view detail control and make the wizard link but when run the error message appear (Cannot insert the value NULL into column 'Cid)
note the identity properties is not pass.
View 2 Replies
Dec 9, 2010
I have two table with a one to many relation.
1- voteChoose has (Choid PK,Choose,Vid)
2-VoteQuestion has(Vid PK,Vquestion,Action)
so when insert a question and answer in a page this error message (
Cannot insert the value NULL into column 'Vid') appears
i use this function to add vote
public void AddVote(string VQuestion, string[] Choose)
View 6 Replies
Dec 2, 2010
i have a webpage built in asp.net c#. it always a user to create a new record in a db table. there are there are two input fields, text and score. text cannot be a null value so if the user doesn't input text onsubmit, the page errors out. i want to throw in some simple error handling code in the code behind page. i've tried including an if/else on_inserted method but ran into some java script errors.
[code]....
View 2 Replies
Aug 16, 2010
I get this error message when publishing on the IIS server :
[Code]....
The server is a Windows 2003 R2 SP2 Edition Standard.
Note that everything is working fine when launched with Visual Studio 2008.
View 5 Replies
Jul 28, 2013
In my asp.net+vb web there is a code as under
If dt1.Tables("PresentTotal").Rows(0).Item("C") Is System.DBNull.Value <> True Then
ctxt.Text = dt1.Tables("PresentTotal").Rows(0).Item("C")
Else
ctxt.Text = ""
End If
The script works fine for those peoples number is in that table but when the number of that person is not there in tahat table then it gives error...
View 1 Replies
Oct 26, 2010
I get the following error message when running a LINQ statement to return a User object:
The 'LastLogin' property on 'User' could not be set to a 'null' value. You must set this property to a non-null value of type 'DateTime'.
The User class is generated by Entity Framework. How does one handle setting properties from database fields that are NULL?
[Code]....
The above line of code is the line that errors.
View 8 Replies
Sep 28, 2010
I have some code which fills a dropdownlist:
pn.DataSource = Datatbl.Tables["datalist"];
pn.DataValueField = "partnumber";
pn.DataTextField = "partnumber";
pn.DataBind();
pn.Items.Insert(0, "");
pn.SelectedValue = ligne["pn"].ToString();
and when the value in the Database in null (""), it throws this error: ArgumentOutOfRangeException: 'pn' has a SelectedValue which is invalid because it does not exist in the list of items. Parameter name: value
View 2 Replies
Mar 3, 2010
for some reason i get an error saying the following. i have tried to look it up on google but there seems to be nothing about this error.
View 2 Replies