|
Hi all
I have a problem. Am tring to display data on dropdown list, i have two dropdown list. i'm displaying data on both from database. when the application starts running the first ddl will list out some data. when we select one the second ddl will display data according to that. but here the problem is, when i select one on first ddl, it is automaticaly errasing all the datas.....
i havint given any where clear command. y it ts not displaying. the problem i nly when it is connected to database. i tried a sample, it is working.
plz help me....
|
|
|
|
|
P_Elza wrote: i tried a sample, it is working.
Not sure what this means.
Have you set breakpoints to see what code is executed ? Best guess is that you're setting the data source on postback, which will clear all viewstate. But that doesn't seem to be exactly what you're describing, do you have a code sample ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillionOneHundredAndFortySevenMillionFourHundredAndEightyThreeThousandSixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it )
|
|
|
|
|
ya i have set
but its not entering to private void DdlCustomer_SelectedIndexChanged(object sender, System.EventArgs e) even if i change the selection.
Code Sample
<br />
private void Page_Load(object sender, System.EventArgs e)<br />
{<br />
if (!IsPostBack)<br />
{<br />
Production.Add_CustomerToCombo(DdlCustomer,DdlTitle,dgDetailData,SQL_SELECT_CUST_NAME);
}<br />
logintime.Text=System.DateTime.Now.ToLongDateString(); <br />
BtnSave.Visible=false;<br />
}<br />
<br />
<br />
private void DdlCustomer_SelectedIndexChanged(object sender, System.EventArgs e)<br />
{<br />
BtnSave.Visible=true;<br />
DdlTitle.Items.Clear();<br />
DdlTitle.Items.Add(new ListItem("---SELECT---","0"));<br />
<br />
}<br />
|
|
|
|
|
OK, then the combobox isn't set up to handle the event, or it's autopostback is not set to true. And, I still think your viewstate is probably off.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillionOneHundredAndFortySevenMillionFourHundredAndEightyThreeThousandSixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it )
|
|
|
|
|
autopostback is set to true and viewstate is on.
but i didnt get
Christian Graus wrote: combobox isn't set up to handle the event
|
|
|
|
|
Do one thing override the page init method put the code of populating the drop down in that method so it will populate every time regardless of postback
if you don't want to hit the database every time then put all values in session instead and and get vlaues from session or similar to like that
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
Try to debug the application put a break point and see whats happening ?
i think after post back the drop down list is not getting populated
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
Do you check IsPostBack when you load data collection for ddl? You should remember; page_load method works before every event-delegation method (ddl SelectedIndexChanged too).
we can work IT out! (Beatles)
|
|
|
|
|
hi..
i have a problem with following code in asp.net/vb.net
here i have a script to go one page to another in asp.net.
in my project i have 2 folders like lookups and PO.
now i want to go to Productformfactor page form PO Page
Productformfactor belongs to lookup folder and PO Page belongs to PO folder
if i don't use saperate folders then it is working...
i have used the following code in PO page to go productFormFactor
but iam getting error message.(i used this code in button click event)
CODE:
Page.ClientScript.RegisterStartupScript(Me.[GetType](), "openpopup", "window.open('Lookups/productFormFactor.aspx','test','scrollbars=2');")
thanku
siri.
siri
|
|
|
|
|
Why are you doing this ? Why not just add a button that calls the javascrpt directly without bothering with a postback ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillionOneHundredAndFortySevenMillionFourHundredAndEightyThreeThousandSixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it )
|
|
|
|
|
Good point.
---
"Anything that is in the world when you're born is normal and ordinary and is just a natural part of the way the world works. Anything that's invented between when you're fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it. Anything invented after you're thirty-five is against the natural order of things."
-- Douglas Adams
|
|
|
|
|
thankyou Christian Graus
and the thing is if go to the Page2 from page1 then the values of controls should not be refresh and it shoul maintain it state.so, i used script.
and even i have tried with setting the enableviwesate=true...
but it is not working
can u plz help me
siri
|
|
|
|
|
I have no idea what your statement about pages means, how are the pages defined ?
It does not matter. You're writing code in a postback to inject javascript to run when the page reloads. Just putting the script directly into the html to run without a postback will do exactly the same thing.
None of the other stuff you're sayng makes any sense to me at all, perhaps you need to explain what you're trying to achieve, given that it seems likely that you're not tryng to do what it is that you're actually doing.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillionOneHundredAndFortySevenMillionFourHundredAndEightyThreeThousandSixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it )
|
|
|
|
|
sirisha guttikonda wrote: iam getting error message.
Quoting the error message would be helpful.
If the folders are in the same location, change 'Lookups/productFormFactor.aspx' to '../Lookups/productFormFactor.aspx'.
---
"Anything that is in the world when you're born is normal and ordinary and is just a natural part of the way the world works. Anything that's invented between when you're fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it. Anything invented after you're thirty-five is against the natural order of things."
-- Douglas Adams
|
|
|
|
|
thanks Guffa
i got it.
thanks a lot
siri
|
|
|
|
|
Hi,
I need to bind the Menu Control(in asp.net 1.1)
from database.(Dynamically).I request you to give me the sample code for that.
Plz hlp me,
Regards,
Magi
|
|
|
|
|
Magh_M wrote: Menu Control(in asp.net 1.1)
Menu Control in ASP.NET 1.1???
Regards - J O N -
|
|
|
|
|
Means i like to show menus operation in my webpage...,
Using any language (javascript or any other else)..,
But its should be userbased entry menus means..,
It will be help full form my screen..,
Plz help me,
Regards,
Magi
|
|
|
|
|
Magh_M wrote: menus operation in my webpage...,
Magh_M wrote: userbased entry menus means..,
I'm Not sure about what you are talking about. In your original post you mentioned that Menu should be loaded dynamically from database. Simple suggestion- Use a repeater control, retrieve the menuitems from the database, store it in a dataset and bind the dataset to the repeater control. Now You will have all the menuitems displayed in the repeater control.
Regards - J O N -
|
|
|
|
|
Hi i did that too...,
i have used repeater control in usercontrol...,
And shown in my aspx page below that i have used one iframe...,
in that i shown some other aspx page...,
now my probs is that iframe contain aspx page scrolling time...,
that iframe contain aspx page some controls are showing above that user control...,
So its hiding that links...,
i dont know how to solve that probs...,
If u dont mind give me some solution for that...,
Or plz send me if u have anycode like that...,
Regards,
Magi
|
|
|
|
|
Hi How to arrach my screen shot in this msg???,
Plz any one tell me,
With that only i can able to explain my probs...,
So any one hlp me to solve my probs,
Regards,
Magi
|
|
|
|
|
You can't.
Upload the image somewhere where it's publically available, and put a link to it in the message.
---
"Anything that is in the world when you're born is normal and ordinary and is just a natural part of the way the world works. Anything that's invented between when you're fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it. Anything invented after you're thirty-five is against the natural order of things."
-- Douglas Adams
|
|
|
|
|
You can create a Custom messge control for that !!!
|
|
|
|
|
hi to all,
I am using asp.net 2.0, in that I designed a webpage for uploading an image. If the user uploads an image it should be automatically change in to thumbnail and it is displayed in that website. I searched in Google but I didn’t get the proper coding for that. So, please help.
jai prakash
|
|
|
|
|
Use the Image.GetThumbnailImage[^] method to create a thumbnail version of your image. Store it on the server file system and reference the image via a URL from your web page.
Paul Marfleet
|
|
|
|