Showing posts with label app. Show all posts
Showing posts with label app. Show all posts

Wednesday, March 28, 2012

The case of the crazy reseting dropdowns :-( Please help!

Hi everyone,

I keep getting a problem with dropdownlist controls. It sounds really stupid,
but my app is screwed as long as this keeps happening.

It seems to spontaneously happen and then I cant fix it without rebuilding
the whole page from scratch! Not Fun. :-(

So whats happening is I have my dropdowns on the page. The user comes along
and selects an option, but when the user submits the page,. its as if nothing
was changed.
The dropdowns all reset themselves to the default values. No modified value
reaches the server so its not just a view state thing (I think).

So basically, my dropdowns just dont work. Bear in mind, that these were
all working perfectly before. I then do some trivial work to the page - adding
controls and the like, and the whole thing just buggers up!

Can anyone think whats happening here? What would cause dropdown controls
to just stop sending their values and reset themselves?

If anyone at all has even the stupidist suggestion I would be so grateful
if you could tell me cos this is getting really serious. Its supposed to
be live now!

:-(

Thanks to anyone who can help

SimonSimon,
Do your dropdown controls have their AutoPostback property set to "true"?
This is required if you want a change by the user to cause a postback
and fire the SelectedIndexChanged event where you can handle the event.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com

"Simon Harvey" wrote:

> Hi everyone,
> I keep getting a problem with dropdownlist controls. It sounds really stupid,
> but my app is screwed as long as this keeps happening.
> It seems to spontaneously happen and then I cant fix it without rebuilding
> the whole page from scratch! Not Fun. :-(
> So whats happening is I have my dropdowns on the page. The user comes along
> and selects an option, but when the user submits the page,. its as if nothing
> was changed.
> The dropdowns all reset themselves to the default values. No modified value
> reaches the server so its not just a view state thing (I think).
> So basically, my dropdowns just dont work. Bear in mind, that these were
> all working perfectly before. I then do some trivial work to the page - adding
> controls and the like, and the whole thing just buggers up!
> Can anyone think whats happening here? What would cause dropdown controls
> to just stop sending their values and reset themselves?
> If anyone at all has even the stupidist suggestion I would be so grateful
> if you could tell me cos this is getting really serious. Its supposed to
> be live now!
> :-(
> Thanks to anyone who can help
> Simon
>
After the user submits the form, how are you getting the values from
the drop downs?

After the form is submitted does yourDropDown.SelectedValue = "" - or
the default value?

Have you tried Request.Form("youDropDown")? Does that still equal ""?

Can you reply back with some code for us?

Jeremy Reid
http://blackstaronline.net/hgtit
are you filling up your combobox each time the page loads? did you use "if
(!Page.IsPostBack)" is not, you should, it's probably your problem.

I hope it helps

ThunderMusic

"Simon Harvey" <nothanks@dotnet.itags.org.hotmail.com> wrote in message
news:94a1890869bf8c8038d5030666f@dotnet.itags.org.news.microsoft.co m...
> Hi everyone,
> I keep getting a problem with dropdownlist controls. It sounds really
> stupid, but my app is screwed as long as this keeps happening.
> It seems to spontaneously happen and then I cant fix it without rebuilding
> the whole page from scratch! Not Fun. :-(
> So whats happening is I have my dropdowns on the page. The user comes
> along and selects an option, but when the user submits the page,. its as
> if nothing was changed.
> The dropdowns all reset themselves to the default values. No modified
> value reaches the server so its not just a view state thing (I think).
> So basically, my dropdowns just dont work. Bear in mind, that these were
> all working perfectly before. I then do some trivial work to the page -
> adding controls and the like, and the whole thing just buggers up!
> Can anyone think whats happening here? What would cause dropdown controls
> to just stop sending their values and reset themselves?
> If anyone at all has even the stupidist suggestion I would be so grateful
> if you could tell me cos this is getting really serious. Its supposed to
> be live now!
> :-(
> Thanks to anyone who can help
> Simon

The case of the crazy reseting dropdowns :-( Please help!

Hi everyone,
I keep getting a problem with dropdownlist controls. It sounds really stupid
,
but my app is screwed as long as this keeps happening.
It seems to spontaneously happen and then I cant fix it without rebuilding
the whole page from scratch! Not Fun. :-(
So whats happening is I have my dropdowns on the page. The user comes along
and selects an option, but when the user submits the page,. its as if nothin
g
was changed.
The dropdowns all reset themselves to the default values. No modified value
reaches the server so its not just a view state thing (I think).
So basically, my dropdowns just dont work. Bear in mind, that these were
all working perfectly before. I then do some trivial work to the page - addi
ng
controls and the like, and the whole thing just buggers up!
Can anyone think whats happening here? What would cause dropdown controls
to just stop sending their values and reset themselves?
If anyone at all has even the stupidist suggestion I would be so grateful
if you could tell me cos this is getting really serious. Its supposed to
be live now!
:-(
Thanks to anyone who can help
SimonSimon,
Do your dropdown controls have their AutoPostback property set to "true"?
This is required if you want a change by the user to cause a postback
and fire the SelectedIndexChanged event where you can handle the event.
Peter
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com
"Simon Harvey" wrote:

> Hi everyone,
> I keep getting a problem with dropdownlist controls. It sounds really stup
id,
> but my app is screwed as long as this keeps happening.
> It seems to spontaneously happen and then I cant fix it without rebuilding
> the whole page from scratch! Not Fun. :-(
> So whats happening is I have my dropdowns on the page. The user comes alon
g
> and selects an option, but when the user submits the page,. its as if noth
ing
> was changed.
> The dropdowns all reset themselves to the default values. No modified valu
e
> reaches the server so its not just a view state thing (I think).
> So basically, my dropdowns just dont work. Bear in mind, that these were
> all working perfectly before. I then do some trivial work to the page - ad
ding
> controls and the like, and the whole thing just buggers up!
> Can anyone think whats happening here? What would cause dropdown controls
> to just stop sending their values and reset themselves?
> If anyone at all has even the stupidist suggestion I would be so grateful
> if you could tell me cos this is getting really serious. Its supposed to
> be live now!
> :-(
> Thanks to anyone who can help
> Simon
>
>
After the user submits the form, how are you getting the values from
the drop downs?
After the form is submitted does yourDropDown.SelectedValue = "" - or
the default value?
Have you tried Request.Form("youDropDown")? Does that still equal ""?
Can you reply back with some code for us?
Jeremy Reid
http://blackstaronline.net/hgtit
are you filling up your combobox each time the page loads? did you use "if
(!Page.IsPostBack)" is not, you should, it's probably your problem.
I hope it helps
ThunderMusic
"Simon Harvey" <nothanks@dotnet.itags.org.hotmail.com> wrote in message
news:94a1890869bf8c8038d5030666f@dotnet.itags.org.news.microsoft.com...
> Hi everyone,
> I keep getting a problem with dropdownlist controls. It sounds really
> stupid, but my app is screwed as long as this keeps happening.
> It seems to spontaneously happen and then I cant fix it without rebuilding
> the whole page from scratch! Not Fun. :-(
> So whats happening is I have my dropdowns on the page. The user comes
> along and selects an option, but when the user submits the page,. its as
> if nothing was changed.
> The dropdowns all reset themselves to the default values. No modified
> value reaches the server so its not just a view state thing (I think).
> So basically, my dropdowns just dont work. Bear in mind, that these were
> all working perfectly before. I then do some trivial work to the page -
> adding controls and the like, and the whole thing just buggers up!
> Can anyone think whats happening here? What would cause dropdown controls
> to just stop sending their values and reset themselves?
> If anyone at all has even the stupidist suggestion I would be so grateful
> if you could tell me cos this is getting really serious. Its supposed to
> be live now!
> :-(
> Thanks to anyone who can help
> Simon
>

Monday, March 26, 2012

The control values are not sent to the form code.

I am new to Web Forms and I ported my little app from Windows Forms to
ASP.NET and I am wondering why some things are not working as before.
Although I figured most of them, one of them is that on my form I have input
fields and a button causing to store all the input fields into the database.
However, when in the button OnClick event I gather all the form control
values by either getting txtBox.Text or lstChoice.SelectedItem, all the
values are not equal to the user choices, but to the values last set by the
form programatically on Form Load. It looks that I am missing some event tha
t
sends the user control values from the client to the server.
Am I missing something?
Thank you
Cezar MartCezar:
Take a look at http://openmymind.net/FAQ.aspx?documentId=2
short answer is you need to wrap the code which initially sets the values in
a if not page.IsPostback then
Karl
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"Cezar" <Cezar@dotnet.itags.org.discussions.microsoft.com> wrote in message
news:E8548106-843F-4252-A39F-4C40BC63774B@dotnet.itags.org.microsoft.com...
> I am new to Web Forms and I ported my little app from Windows Forms to
> ASP.NET and I am wondering why some things are not working as before.
> Although I figured most of them, one of them is that on my form I have
input
> fields and a button causing to store all the input fields into the
database.
> However, when in the button OnClick event I gather all the form control
> values by either getting txtBox.Text or lstChoice.SelectedItem, all the
> values are not equal to the user choices, but to the values last set by
the
> form programatically on Form Load. It looks that I am missing some event
that
> sends the user control values from the client to the server.
> Am I missing something?
> Thank you
> Cezar Mart
>

The control values are not sent to the form code.

I am new to Web Forms and I ported my little app from Windows Forms to
ASP.NET and I am wondering why some things are not working as before.
Although I figured most of them, one of them is that on my form I have input
fields and a button causing to store all the input fields into the database.
However, when in the button OnClick event I gather all the form control
values by either getting txtBox.Text or lstChoice.SelectedItem, all the
values are not equal to the user choices, but to the values last set by the
form programatically on Form Load. It looks that I am missing some event that
sends the user control values from the client to the server.
Am I missing something?
Thank you
Cezar MartCezar:
Take a look at http://openmymind.net/FAQ.aspx?documentId=2

short answer is you need to wrap the code which initially sets the values in
a if not page.IsPostback then

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)

"Cezar" <Cezar@dotnet.itags.org.discussions.microsoft.com> wrote in message
news:E8548106-843F-4252-A39F-4C40BC63774B@dotnet.itags.org.microsoft.com...
> I am new to Web Forms and I ported my little app from Windows Forms to
> ASP.NET and I am wondering why some things are not working as before.
> Although I figured most of them, one of them is that on my form I have
input
> fields and a button causing to store all the input fields into the
database.
> However, when in the button OnClick event I gather all the form control
> values by either getting txtBox.Text or lstChoice.SelectedItem, all the
> values are not equal to the user choices, but to the values last set by
the
> form programatically on Form Load. It looks that I am missing some event
that
> sends the user control values from the client to the server.
> Am I missing something?
> Thank you
> Cezar Mart

Saturday, March 24, 2012

the easiest way to convert a .net windows app to web app?

Hi all,

I would like to know what is the easiest way to convert a
VB.net window application to a web application?

Thanks in advance!
tom> I would like to know what is the easiest way to convert a
> VB.net window application to a web application?

Do you mean ASP.Net?

Anders
Yes. We want to convert a .net window app to asp.net.
Thanks for your response.

>--Original Message--
>> I would like to know what is the easiest way to convert
a
>> VB.net window application to a web application?
>Do you mean ASP.Net?
>Anders
>
>.
> >> I would like to know what is the easiest way to convert
> a
> >> VB.net window application to a web application?

U can't do that directly...at all.

Maybe you can reuse your datalayer, (if you got one) and webservices (if
have such) and maybe someone of your util classes and or custom collections.

The problem about the windows gui and webpages differ SO much and is not
compareable. Not even with the aproach with asp.net.

But you will have an easier way converting your projects "code logic",
because you can seperate ypur visual design and logic design (code behind
files)

I dont know if you wanted to know if there was utility or so? Or you just
wanted some guidelines.

You could (Dangerous grund) look at deploying your application with notouch
technology.
http://msdn.microsoft.com/library/d...etframework.asp

But its problbly not what ypu are looking for.

Plz specify want your wanna know and we wil try and help you.

Regards,
Anders

Thursday, March 22, 2012

The grid as a reportwriter

Hi,

I've planned an app where there's a lot of columns in a table and because of
that I'd like to split up the columns when presenting them in a datagrid.

I'll give you an example. It's always one year between every row

row _type descr amount remAmount rate interest accruedInterest
1 1 Claim1 100000 100000 10 10000 10000
2 1 Claim2 100000 200000 10 20000 30000
row _type descr amount remAmount myRemPart taxRemPart accrInt myAccPart
3 2 Paym1 -200000 30000 119000 51000 0
21000
row _type descr amount remAmount rate interest accruedInt
4 1 Claim3 100000 130000 10 13000 .....

As you can see both claims and payments are in the same table (grid) with
different headers. And in row 3 you can see that total amount is first taken
from accruedinterest and then from remainderamount columns.

I'd like to have both claims( demands ) and payments to show up in the same
grid, so to speak.

Any ideas?

TIA

Kenneth PHi Kenneth,

You can apply crystal reports to create and show
complicated report.

Elton Wang
elton_wang@.hotmail.com

>--Original Message--
>Hi,
>I've planned an app where there's a lot of columns in a
table and because of
>that I'd like to split up the columns when presenting
them in a datagrid.
>I'll give you an example. It's always one year between
every row
>row _type descr amount remAmount rate interest
accruedInterest
> 1 1 Claim1 100000 100000 10 10000
10000
> 2 1 Claim2 100000 200000 10 20000
30000
>row _type descr amount remAmount myRemPart
taxRemPart accrInt myAccPart
> 3 2 Paym1 -200000 30000 119000
51000 0
> 21000
>row _type descr amount remAmount rate interest
accruedInt
> 4 1 Claim3 100000 130000 10
13000 .....
>As you can see both claims and payments are in the same
table (grid) with
>different headers. And in row 3 you can see that total
amount is first taken
>from accruedinterest and then from remainderamount
columns.
>I'd like to have both claims( demands ) and payments to
show up in the same
>grid, so to speak.
>Any ideas?
>TIA
>Kenneth P
>.
Hi Elton,

I know about reports and CR.

They don't apply here in the first place. I need a report to the screen,
most preferable in a grid, perhaps as a drill down gridreport. When that's
ok, I'll go for the report on paper.

Any ideas?

Kenneth P

"Elton Wang" wrote:

> Hi Kenneth,
> You can apply crystal reports to create and show
> complicated report.
> Elton Wang
> elton_wang@.hotmail.com
> >--Original Message--
> >Hi,
> >I've planned an app where there's a lot of columns in a
> table and because of
> >that I'd like to split up the columns when presenting
> them in a datagrid.
> >I'll give you an example. It's always one year between
> every row
> >row _type descr amount remAmount rate interest
> accruedInterest
> > 1 1 Claim1 100000 100000 10 10000
> 10000
> > 2 1 Claim2 100000 200000 10 20000
> 30000
> >row _type descr amount remAmount myRemPart
> taxRemPart accrInt myAccPart
> > 3 2 Paym1 -200000 30000 119000
> 51000 0
> > 21000
> >row _type descr amount remAmount rate interest
> accruedInt
> > 4 1 Claim3 100000 130000 10
> 13000 .....
> >As you can see both claims and payments are in the same
> table (grid) with
> >different headers. And in row 3 you can see that total
> amount is first taken
> >from accruedinterest and then from remainderamount
> columns.
> >I'd like to have both claims( demands ) and payments to
> show up in the same
> >grid, so to speak.
> >Any ideas?
> >TIA
> >Kenneth P
> >.
I'm not really clear on exactly what you want to do but here's a couple of
ideas...

First, look at how an ASP.NET DataGrid is actually rendered. It's nothing
more than an HTML table where each <TR> contains data from one row in the
DataGrid's data source and each individual item in that row is rendered as a
<TD> within a given <TR>. You can dress that up quite a bit by using item
templates but that rendering scheme still locks you into a set of <TR> tags,
one for each row of data.

DataLists and DataRepeaters both provide more flexibility. Yet, things work
very
similarly in the sense that they are multiple-value databound controls...so
whatever is rendered is rendered n times, depending on how many row of data
are present in the data source.

The example you gave suggests a Data List. In a DataList, you can put item
values into separate <TR>s, even when they are in the same row of data. This
is because the <TR> and <TD> tags are explicitly coded in the .aspx file;
they are not impied as in the case of a DataGrid. Things are, by default,
still rendered in a <TABLE>.

A DataRepeater is even more chaotic. No tabluar form is implied, it just
pretty much just spits out the .aspx code as is, except that repitition
is still impled and data binding still occurs. Your mention of a drilldown
grid
makes me think you might need a repeater that has one or more of user
controls embedded in it. As the user clicks various options within the user
controls, the display is changed - possibly by client-side scripts that open
new windows, make things visible or not visible...or whatever you need it to
do.

MSDN has more information but honestly, you may want to look elsewhere. I
never found the MSDN info. on DataGrids, DataLiasts, and DataRepeaters to be
especially helpful.

Good Luck.

"Kenneth P" wrote:

> Hi Elton,
> I know about reports and CR.
> They don't apply here in the first place. I need a report to the screen,
> most preferable in a grid, perhaps as a drill down gridreport. When that's
> ok, I'll go for the report on paper.
> Any ideas?
> Kenneth P
> "Elton Wang" wrote:
> > Hi Kenneth,
> > You can apply crystal reports to create and show
> > complicated report.
> > Elton Wang
> > elton_wang@.hotmail.com
> > >--Original Message--
> > >Hi,
> > > >I've planned an app where there's a lot of columns in a
> > table and because of
> > >that I'd like to split up the columns when presenting
> > them in a datagrid.
> > > >I'll give you an example. It's always one year between
> > every row
> > > >row _type descr amount remAmount rate interest
> > accruedInterest
> > > 1 1 Claim1 100000 100000 10 10000
> > 10000
> > > 2 1 Claim2 100000 200000 10 20000
> > 30000
> > >row _type descr amount remAmount myRemPart
> > taxRemPart accrInt myAccPart
> > > 3 2 Paym1 -200000 30000 119000
> > 51000 0
> > > 21000
> > >row _type descr amount remAmount rate interest
> > accruedInt
> > > 4 1 Claim3 100000 130000 10
> > 13000 .....
> > > >As you can see both claims and payments are in the same
> > table (grid) with
> > >different headers. And in row 3 you can see that total
> > amount is first taken
> > >from accruedinterest and then from remainderamount
> > columns.
> > > >I'd like to have both claims( demands ) and payments to
> > show up in the same
> > >grid, so to speak.
> > > >Any ideas?
> > > >TIA
> > > >Kenneth P
> > >.
>