|
I am trying to delete a record using item deleteing event. But it is showing error as null reference exception. Can anybody help please.
|
|
|
|
|
Not based on this. What line gives you the error ? What does your code look like ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
It is inside a details view. I have taken the values inside the details view from session object
I have a kept a int to take the datakey value. but this is showing an error
int Refno = (int)DetailsView1.DataKey.Value;
|
|
|
|
|
and does the debugger tell you that one or more of these values are null, or Value is not an int ? Does Convert.ToInt32, or int.TryParse do better than straight cast ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
It is showing error like this
NullReferenceException: Object reference not set to an instance of an object. at Details.DetailsView1_ItemDeleting(Object sender, DetailsViewDeleteEventArgs e)
|
|
|
|
|
I have created a custom error web page which is supposed to be displayed when the user tries to access an invalid page but instead of the custom error page appearing, the standard "Server Error in 'Error handling' application. The resource cannot be found" asp.net error page appeared instead.
I edited the web.config file like this:
customErrors mode="Off" defaultRedirect="PageNotFound.aspx"
error statusCode="403" redirect="PageNotFound.aspx"/
error statusCode="404" redirect="PageNotFound.aspx"/
*I removed the tags because it seems that text within tags cant be displayed
The custom page's name is PageNotFound.aspx.
The default address of the website is: http://localhost:1351/Error%20handling
When I tried to access a non existant web page like:
http://localhost:1351/Error%20handling/lucky.aspx , only the standard error page appeared instead of the custom error page.
How do I make the custom error page appear?
|
|
|
|
|
Is the PageNotFound.aspx page at the base directory of the website? If you type this does it work? http://localhost:1351/Error%20handling/PageNotFound.aspx
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
i am using javascript to redirect to a page when radiobutton is clicked
function radio(url)
{
windows.location.href=url;
}
this is not working can any body help me out with this
|
|
|
|
|
If you are using asp.net 1.x or 2.0, It is better you go for Server RadioButton control.
Default it is not selected.
CheckedChanged is fired if radiobutton is selected or deselected.
In server you can use
vb.net
Response.Redirect(url)
c#
Response.Redirect(url);
for redirecting the page.
|
|
|
|
|
Can anyone help me for Sending Email Using Outlook in asp.net 2.0 with C#, please
|
|
|
|
|
Do you really need to use Outlook? Do you mean instead use SMTP?
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
You can't. When you remote control outlook, it pops up a message to the user, and that message will occur on the server end. Even if the message doesn't require the user to click anything, it will introduce a 10 second delay or something.
As someone said, there are perfectly good SMTP classes in the framework.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Someone? I'm just someone?
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
ROTFL - I often wish it was possible to view the entire thread while writing a reply, so I could remember names and look at other responses. I might mention that to Chris.....
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
When i set HttpContext.Current.Session while using thread it gives me error "Object reference is not set to an instance of an object" for Http.Context object IN THE CLASS(not on web page - aspx). But i can set Session object in the aspx page with no errors, and also i can set Session object in the class while NOT USING THREAD. How can i resolve this?
thanks in advance..
maxat
|
|
|
|
|
I have a website that curently have an admin section with which a user can manage site . I use the cookie name set in web.config file for authenticating the admin user of the site. Now I am gonna add normal user membership other that admin to my site. I have a problem regarding "authentication cookie name" for normal users as I have already used that for admin users. As you now I am not allowed to define another authentication cookie name at folder level.(But application level). So what is your recommendation to this problem ?? Should I use a normal cookie other that the one defined in web.cofig file to authenticate users . I need this . I will appreciate your help . Thanks in advance.
|
|
|
|
|
I'd authenticate that a user is logged in at all, and then have a permissions system that works out for each user what they are allowed to see and do on the site. So, the back end decides if a user is an admin. This is harder to hack than a cookie, which lives on the client machine.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
hi everybody
i have a case study to assign employee for shift using (asp.net)
1- the duty is 24 hours
2- assign each employee to 7 days (or lets say 7 times) , weekend is included and they want the program to generat it randomly
for example :- if the employee assigned for a day of the weekdays the other day it should be at the weekend. our weekends is (Thursday and friday)
let's say fisrt shift in saturday. the next day shift must be in weekend thursday or friday.i will explain in more details:-
here is the schedule what it should be look like (1) saturday (2) friday(weekend) (3) sunday (4) thursday (5) tuesday (6) wednesday (7) monday
3- the code should generat it atomaticly and randomly.
4- we have more than 70 employees.
5- (2) employees per a day
6- the printed report should show the id number and the day
plz help me with that
waleed
|
|
|
|
|
Which part of your homework are you stuck with ? Which parts do you understand ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
i did not start it yet i'm just preparing a pototype and just i need some hints to start writing the code ..... thanx for replying
waleed
|
|
|
|
|
Again, your question is too broad. Do you know how to generate a random number ? Do you know how to show your data on the page ? Which bits do you need help with ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
yes i know how to generate random numbers and show my data but the problem is:- i create table for the employees
ID_number
name
rank
mobile phone
section
----------------
first of all do i need to make another table for the weekdays and make my program to assign day to employee randomly
the lay out report should this way
employee id employee name shift day
2354 john saturday
2354 john friday >>>>>> next shift
hints : weekend is (Thursday and friday)
waleed
|
|
|
|
|
Yes, I imagine you need to create a table for the weeks and then assign data to that table.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
waleed666 wrote: hints : weekend is (Thursday and friday)
Hints? We don't need hints, you need the hints to do your homework. This is a help site, ask specific questions for the problems you have.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
i have a gridview which contains a textbox,checkbox, and a dropdown list
my question is
the textbox field value is generated by datasource A and dropdownlist fields items is generated from datasouce B which depends on checkbox field value, how can i accomplish this??
thanks in advance
|
|
|
|