Forum Moderators: open

Message Too Old, No Replies

System.StackOverflowException was unhandled

I am getting this error while doing the following code

         

ashish21cool

7:16 am on Nov 8, 2007 (gmt 0)

10+ Year Member



Dear Frnds,

I have a web form in my application.

I have added a dropdown list to that form.

Now in the code behind, I have declared an array with five values.

I want to fill that dropdownlist with the array values. The code in the code behind is as follows:
public partial class _Default : System.Web.UI.Page
{
public string[] arrData ={ "This", "That", "and", "the", "other" };
protected void Page_Load(object sender, EventArgs e)
{

Page.DataBind();
}
}

Please suggest me with the necessary changes as I am getting the following error "System.StackOverflowException was unhandled"

Thanks for the help.

ashish21cool

7:18 am on Nov 8, 2007 (gmt 0)

10+ Year Member



I forgot to tell you that I am using asp.net 2.0

carguy84

11:26 pm on Nov 13, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm a VB.NET guy, not a C# guy, but what are you DataBinding? Page.DataBind doesn't hold your array value, nor did you reference the dropdownlist anywhere. Or is this just a snippet of the code?

ashish21cool

4:53 am on Nov 17, 2007 (gmt 0)

10+ Year Member



Dear Carguy84,

Thanks for taking out time for asking information.

I have resolved that issue. I had not given ddl a source due to which the error was taking place.

Besides, how come are you working in vb.net. Start working on c# as well, will help you alot.

Thanks.

carguy84

6:19 am on Nov 17, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



They're the same, it's just a context thing, and my background was VB :)

ashish21cool

11:24 am on Nov 17, 2007 (gmt 0)

10+ Year Member



I have no issues to what you are learning.

I just informed you as industry picks up people working in C# fast.

If you have your own biz then you have no issues for searching job.

Cheerz

carguy84

9:08 pm on Nov 17, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If I could go back, I'd probably pick up C# because it's so close to JAVA that it would make a transition pretty easy.

But, it's moot, since I work for myself, so now I just worry about doing ANY coding ;)

ashish21cool

12:27 pm on Nov 19, 2007 (gmt 0)

10+ Year Member



What kind of projects do u take?
Also lets exchange email ids for further communication.
Do sticky me ur email.
Look forward to hearing from you.
Best Regards