Click here to Skip to main content
15,916,030 members
Home / Discussions / C#
   

C#

 
QuestionWhat options do I have for reading data from an excel spreadsheet, and what are the limitations of each? Pin
agent15429-Jul-14 15:05
agent15429-Jul-14 15:05 
AnswerRe: What options do I have for reading data from an excel spreadsheet, and what are the limitations of each? Pin
PIEBALDconsult29-Jul-14 15:14
mvePIEBALDconsult29-Jul-14 15:14 
AnswerRe: What options do I have for reading data from an excel spreadsheet, and what are the limitations of each? Pin
SledgeHammer0129-Jul-14 18:09
SledgeHammer0129-Jul-14 18:09 
GeneralRe: What options do I have for reading data from an excel spreadsheet, and what are the limitations of each? Pin
Mycroft Holmes29-Jul-14 19:18
professionalMycroft Holmes29-Jul-14 19:18 
AnswerRe: What options do I have for reading data from an excel spreadsheet, and what are the limitations of each? Pin
Bernhard Hiller29-Jul-14 20:34
Bernhard Hiller29-Jul-14 20:34 
AnswerRe: What options do I have for reading data from an excel spreadsheet, and what are the limitations of each? Pin
Richard Deeming30-Jul-14 1:33
mveRichard Deeming30-Jul-14 1:33 
AnswerRe: What options do I have for reading data from an excel spreadsheet, and what are the limitations of each? Pin
jschell31-Jul-14 9:29
jschell31-Jul-14 9:29 
Questionstack / heap assignment under the hood Pin
taking_liberties29-Jul-14 4:06
taking_liberties29-Jul-14 4:06 
AnswerRe: stack / heap assignment under the hood Pin
Simon_Whale29-Jul-14 4:29
Simon_Whale29-Jul-14 4:29 
GeneralRe: stack / heap assignment under the hood Pin
harold aptroot29-Jul-14 4:52
harold aptroot29-Jul-14 4:52 
GeneralRe: stack / heap assignment under the hood Pin
taking_liberties29-Jul-14 6:42
taking_liberties29-Jul-14 6:42 
AnswerRe: stack / heap assignment under the hood Pin
OriginalGriff29-Jul-14 5:07
mveOriginalGriff29-Jul-14 5:07 
GeneralRe: stack / heap assignment under the hood Pin
Rob Philpott29-Jul-14 6:19
Rob Philpott29-Jul-14 6:19 
GeneralRe: stack / heap assignment under the hood Pin
OriginalGriff29-Jul-14 6:25
mveOriginalGriff29-Jul-14 6:25 
GeneralNot enough storage is available to complete this operation Pin
Tal Humy29-Jul-14 3:20
Tal Humy29-Jul-14 3:20 
QuestionRe: Not enough storage is available to complete this operation Pin
Eddy Vluggen29-Jul-14 6:24
professionalEddy Vluggen29-Jul-14 6:24 
GeneralRe: Not enough storage is available to complete this operation Pin
Bernhard Hiller29-Jul-14 20:43
Bernhard Hiller29-Jul-14 20:43 
QuestionOData 4 $InLineCount Pin
JoelPark28-Jul-14 10:58
JoelPark28-Jul-14 10:58 
AnswerRe: OData 4 $InLineCount Pin
OriginalGriff28-Jul-14 21:38
mveOriginalGriff28-Jul-14 21:38 
AnswerRe: OData 4 $InLineCount Pin
Kornfeld Eliyahu Peter28-Jul-14 22:20
professionalKornfeld Eliyahu Peter28-Jul-14 22:20 
GeneralRe: OData 4 $InLineCount Pin
JoelPark29-Jul-14 3:37
JoelPark29-Jul-14 3:37 
QuestionHow to retain Dropdownlist value after selectedindexchanged and postback?? Pin
lan160727-Jul-14 14:07
lan160727-Jul-14 14:07 
AnswerRe: How to retain Dropdownlist value after selectedindexchanged and postback?? Pin
Ron Nicholson28-Jul-14 4:48
professionalRon Nicholson28-Jul-14 4:48 
AnswerRe: How to retain Dropdownlist value after selectedindexchanged and postback?? Pin
Member 924543128-Jul-14 8:21
Member 924543128-Jul-14 8:21 
GeneralRe: How to retain Dropdownlist value after selectedindexchanged and postback?? Pin
lan160729-Jul-14 14:01
lan160729-Jul-14 14:01 
Thanks for your replies.. i tried your suggestion by storing the selectedindex of my second dropdownlist into session. i put a breakpoint on Loading event to see if the selectedindex value was stored but unfortunately it was not stored,it always stored the first value of my second dropdownlist.. here are some of my codes below

private void _getSection()
{
ddlSection.Datasource=_queries("StoredProc",ddlLevel.SelectedIndexChanged);
ddlSection.DataTextField ="SectionName";
ddlSection.DataValueField="id";
ddlSection.DataBind();
}

private void _loadLevels()
{
//_queries is a class handles all queries to my sql database.

ddlLevel.Datasource=_queries("select * from levels");
ddlLevel.DataTextField ="LevelName";
ddlLevel.DataValueField ="id";
ddlLevel.DataBind();
}

on my pageload event i call the _loadLevels() function. I have this condition

if(!IsPostback)
{
_loadLevels();
}
if(Session["_sectionid"]!=null)
{
string _result = Session["_sectionid"].Tostring();
}

//---------------
protected void ddlLevel_SelectedIndexChanged(object sender, EventArgs e)
{
Session["_sectionid"]=ddlSection.Selectedindex;
_getSection(); //-- this will populate the section in my ddlSection which values are
ex. DataTextField DataValueField
St.Dominic 1
St.Agustine 2
}

Autopostback of my DDL's is set to True and EnableViewState from my masterpage is also set into True.

Every time i select the second or third item in my ddlSection it always give me the first index I can't understand???...Im sure that there is no event calling my _getSection function only in the ddlLevel. by the way Im using Masterpage but there is no code i have in my masterpage. Please let me know what's happening on this scenario?

modified 30-Jul-14 1:38am.

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.