|
salon wrote: If u can see I have replied my message as "I got the solution"
so i deleted the message....
Which goes to prove my point.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
You can add a button to download the data as a CSV and use the response object to write the right headers and data for the user to download the data.
This will create a file dialog for them to select where to save the data.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi,
I am populating DropDownList using Data Source, and assigning Value and binding it using following code.
ddlCustomer.DataSource = dsSeedData.Tables["Cust"];
ddlCustomer.DataTextField = dsSeedData.Tables["Cust"].Columns["CustomerName"].ColumnName.ToString();
ddlCustomer.DataValueField = dsSeedData.Tables["Cust"].Columns["Customer_ID"].ColumnName.ToString();
ddlCustomer.DataBind();
When i fetch value, it fetch first value from Dropdown, after click on Save button. After postback it reset all the value. To fetch i m using following code.
object[] param=new object[50];
param[0] = ddlCustomer.SelectedItem.Value;
What should be approach to Solve this problem.
Thanks.
|
|
|
|
|
Make sure you have viewstate turned on.
|
|
|
|
|
Yes, Navaneeth.
ViewState Property is True ( EnableViewState="True").
|
|
|
|
|
Try developer.net's suggestion. That might solve issue
|
|
|
|
|
Write your dropdown filling code in if(!IsPostBack){...} in page load event....
When you fail to plan, you are planning to fail.
|
|
|
|
|
|
|
SreejithAchutan wrote: Gdv_Dept_List.SelectedIndex = curSelRowIdx;
CommandEventArgs ce;
GridViewCommandEventArgs e;
ce = new CommandEventArgs("Select", curSelRowIdx);
e = new GridViewCommandEventArgs(Gdv_Dept_List.Rows[curSelRowIdx], ce);
Gdv_Dept_List_RowCommand1(Gdv_Dept_List, e);
Gdv_Dept_List.SelectedIndex = curSelRowIdx;
Your code is a mess. Why you need initialize event arguments ? You are not binding the grid, you are not getting the data corresponds to the supplied id, you are not setting the data source, you are not calling DataBind() .
|
|
|
|
|
Thanks for your rteply sir...Actually i bind the grid in properway,but i forget to paste the code for that.Sory for hurting you.Actually my problem is when we enter data highlight the current entered data.I sort out the problem.Anyway thanks for your reply.
With Warm Regards Sreejith.
|
|
|
|
|
|
Is there any way for sql server 2000 to alert my web application (asp.net 2.0) whenever some perticular filed value is updated ? can we use triggers ?
Lieut
|
|
|
|
|
Of course not. For starters, SQL Server doesn't do that, but even then, how is it going to communicate with a client who is already viewing a page ? And, if they refresh the page, then it's going to request the data from the server and update itself anyhow.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
OK Great !! Thanks for saving my time All i have to do now is to make the web application update itself on any user interaction.
Madni
|
|
|
|
|
Yeah - that's the way to go. It's a common misunderstanding, but there's no mechanism going from the DB to your app, only when the app initiates the request.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi all....
I am developing an app....I got stuck a place where i have to send a mail which displays his password to my clients mail id if he forgets his password....How can i achieve this?
Any example or source code will be appreciated.
modified on Friday, March 7, 2008 12:04 AM
|
|
|
|
|
with the email classes that are built in to .NET ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
|
OK - after you googled for help on this topic and found all the examples online, which bit was still causing you confusion ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I have implemented custom paging I find the BottomPagerRow is no longer visible after selecting a row on the last page index only. Any suggestions welcome.
Regards
dotman1
|
|
|
|
|
My ISP is reluctant to host any LAMP software and will only support .net based stuff.
I have found Presstopia[^] but am wondering if anyone knows of any other . net based blog software. (doesn't have to be free).
|
|
|
|
|
|
Thanks Navaneeth,
That helps a lot.
(Sorry for the late reply, I have been in Melbourne for the F1).
|
|
|
|
|
Session state has created a session id, but cannot save it because the response was already flushed by the application.
I have a big problem with this error.
Few days ago, web app worked fine and when session expired and I refreshed the page, code inside Session_Start in global.asax logs me in again.
cookie = Request.Cookies["Userword"];
if (cookie != null)
{
string strCookie = cookie.Value;
if (strCookie != "")
{
sin.AutoLogin(cookie.Values["heavy"],
cookie.Values["metal"],
true, Request.UrlReferrer.AbsoluteUri == null ? "" : Request.UrlReferrer.AbsoluteUri, false);
}
}
else
{
if (Session["UserInfo"] == null)
{
Response.Redirect("login.aspx");
}
}
Yesterday I can't login by refreshing the page, any more.
If I login manually, everything is ok. Error raises only when session expires and user refreshes the page.
When I try to step in AutoLogin function, try catch block catches the Object reference error before debugger was able to step into a function.
The above error I caught in Application_Error in global.asax.
I have searched the net for solution, but with no luck.
Most of the answers were that you shouldn't use Response.Flush and I have Response.Flush only in captcha class which is loaded on login.aspx page and everything worked great until yesterday.
Can anyone help me with this issue?
|
|
|
|