Click here to Skip to main content
15,910,277 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralDatetime problem Pin
eyeseetee28-Feb-08 5:04
eyeseetee28-Feb-08 5:04 
GeneralRe: Datetime problem Pin
ChrisKo28-Feb-08 5:37
ChrisKo28-Feb-08 5:37 
Generalrefresh button as a hyperlink Pin
eyeseetee28-Feb-08 4:24
eyeseetee28-Feb-08 4:24 
GeneralRe: refresh button as a hyperlink Pin
eyeseetee28-Feb-08 4:50
eyeseetee28-Feb-08 4:50 
GeneralRe: refresh button as a hyperlink Pin
Not Active28-Feb-08 12:34
mentorNot Active28-Feb-08 12:34 
GeneralRe: refresh button as a hyperlink Pin
Amol M Vaidya28-Feb-08 16:48
professionalAmol M Vaidya28-Feb-08 16:48 
GeneralRe: refresh button as a hyperlink Pin
eyeseetee28-Feb-08 21:20
eyeseetee28-Feb-08 21:20 
Generalfaster or better approach of filling data to dropdownlist Pin
mohd imran abdul aziz28-Feb-08 4:20
mohd imran abdul aziz28-Feb-08 4:20 
Hi all,
I am using asp.net2.0 , C#.
I would like to know which is the best approach(faster ) to fill dopdownlist
1. making stored procedure and filling data to dropdownlist using datareader
2. passing query and filling data to dropdownlist using datareader

As I am facing problem of slowness of filling data . if you find any better approach or faster approach please guide me. database is not much heavy

Method I used to fill dropdownlist is
<br />
public void FillctrlList2(DropDownList ctrl, string procedurename,string fieldtext ,string fieldvalue , string conn, SqlCommand cmd, int i)<br />
    {<br />
<br />
        try<br />
        {<br />
            if (con == null)<br />
            {<br />
                this.openconnection(conn);<br />
                this.con.Open(); //  con.Open();<br />
<br />
            }<br />
            if (con.State == ConnectionState.Closed)<br />
            {<br />
                this.openconnection(conn);<br />
                con.Open();<br />
            }<br />
            ctrl.Items.Clear();<br />
            ctrl.Items.Add(new ListItem("Select One", "0" ));<br />
                 cmd.Connection = con;<br />
            cmd.CommandText = procedurename;<br />
            cmd.CommandType = CommandType.StoredProcedure;<br />
  <br />
            rdr = cmd.ExecuteReader();<br />
               <br />
            ctrl.DataSource = rdr;<br />
            ctrl.DataTextField = fieldtext;<br />
            ctrl.DataValueField = fieldvalue;<br />
            ctrl.DataBind();<br />
              <br />
            rdr.Close(); <br />
         }<br />
        catch (Exception ex)<br />
        {<br />
            throw ex;<br />
<br />
        }<br />
    }<br />
<br />


regards
imran khan

GeneralRe: faster or better approach of filling data to dropdownlist Pin
Guffa28-Feb-08 4:44
Guffa28-Feb-08 4:44 
GeneralRe: faster or better approach of filling data to dropdownlist Pin
N a v a n e e t h28-Feb-08 14:55
N a v a n e e t h28-Feb-08 14:55 
GeneralRe: faster or better approach of filling data to dropdownlist Pin
Guffa28-Feb-08 19:43
Guffa28-Feb-08 19:43 
GeneralRe: faster or better approach of filling data to dropdownlist Pin
ChrisKo28-Feb-08 5:34
ChrisKo28-Feb-08 5:34 
GeneralMembership access rules not working Pin
Richard Jones28-Feb-08 4:07
Richard Jones28-Feb-08 4:07 
QuestionHi friends. Help me Pin
G Nathan28-Feb-08 2:59
G Nathan28-Feb-08 2:59 
GeneralRe: Hi friends. Help me Pin
eyeseetee28-Feb-08 3:11
eyeseetee28-Feb-08 3:11 
GeneralRe: Hi friends. Help me Pin
Vasudevan Deepak Kumar28-Feb-08 4:05
Vasudevan Deepak Kumar28-Feb-08 4:05 
QuestionHow to avoid button call event on page refresh Pin
Nagraj Naik28-Feb-08 2:44
Nagraj Naik28-Feb-08 2:44 
AnswerRe: How to avoid button call event on page refresh Pin
eyeseetee28-Feb-08 3:17
eyeseetee28-Feb-08 3:17 
GeneralRe: How to avoid button call event on page refresh Pin
ChrisKo28-Feb-08 5:27
ChrisKo28-Feb-08 5:27 
GeneralRe: How to avoid button call event on page refresh Pin
Not Active28-Feb-08 12:18
mentorNot Active28-Feb-08 12:18 
GeneralRe: How to avoid button call event on page refresh Pin
ChrisKo28-Feb-08 12:41
ChrisKo28-Feb-08 12:41 
QuestionOnClick or OnFocus event handler for textbox Pin
Muhammad Gouda27-Feb-08 23:02
Muhammad Gouda27-Feb-08 23:02 
GeneralRe: OnClick or OnFocus event handler for textbox Pin
Christian Graus27-Feb-08 23:08
protectorChristian Graus27-Feb-08 23:08 
GeneralRe: OnClick or OnFocus event handler for textbox Pin
Muhammad Gouda27-Feb-08 23:30
Muhammad Gouda27-Feb-08 23:30 
GeneralRe: OnClick or OnFocus event handler for textbox Pin
Christian Graus28-Feb-08 9:46
protectorChristian Graus28-Feb-08 9:46 

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.