Click here to Skip to main content
15,886,806 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: is it impossible read asp file in visual studio2010? Pin
buffering8330-Jun-11 18:27
buffering8330-Jun-11 18:27 
GeneralRe: is it impossible read asp file in visual studio2010? Pin
#realJSOP1-Jul-11 4:10
mve#realJSOP1-Jul-11 4:10 
Questionback button maintain state Pin
arkiboys30-Jun-11 2:04
arkiboys30-Jun-11 2:04 
AnswerRe: back button maintain state Pin
Not Active30-Jun-11 2:39
mentorNot Active30-Jun-11 2:39 
QuestionHow To Fill gridview textbox by selecting data from gridview Dropdownlist Pin
vanillaET30-Jun-11 1:04
vanillaET30-Jun-11 1:04 
AnswerRe: How To Fill gridview textbox by selecting data from gridview Dropdownlist Pin
raju melveetilpurayil30-Jun-11 1:53
professionalraju melveetilpurayil30-Jun-11 1:53 
GeneralRe: How To Fill gridview textbox by selecting data from gridview Dropdownlist Pin
vanillaET1-Jul-11 1:35
vanillaET1-Jul-11 1:35 
AnswerRe: How To Fill gridview textbox by selecting data from gridview Dropdownlist [modified] Pin
cpsglauco3-Jul-11 23:41
cpsglauco3-Jul-11 23:41 
Hi,
I suggest to you a javascript client solution:

add this javascript function somewhere in your project
function selectChoice(ddl, textboxID) {
    var chosenoption = ddl.options[ddl.selectedIndex];
    if (chosenoption.value != 'nothing') {
        document.getElementById(textboxID).value = chosenoption.value;
    }
}


add onrowdatabound event for your grid with this code:

protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
    if (e.Row.RowType == DataControlRowType.DataRow)
    {
        DropDownList ddlChoice = e.Row.FindControl("ddlChoice") as DropDownList;
        TextBox txtSelectedValue = e.Row.FindControl("txtSelectedValue") as TextBox;

        string jScript = "selectChoice(this, '{0}');";
        ddlChoice.Attributes.Add("onchange", string.Format(jScript, txtSelectedValue.ClientID));
    }
}


____________________
Web Programmer
http://glucolo.wordpress.com

modified on Monday, July 4, 2011 6:10 AM

QuestionDynamic Change in URL of webservice configuration. Pin
Smart_Boy29-Jun-11 21:08
Smart_Boy29-Jun-11 21:08 
AnswerRe: Dynamic Change in URL of webservice configuration. Pin
Parwej Ahamad29-Jun-11 23:02
professionalParwej Ahamad29-Jun-11 23:02 
GeneralRe: Dynamic Change in URL of webservice configuration. Pin
Smart_Boy29-Jun-11 23:31
Smart_Boy29-Jun-11 23:31 
GeneralRe: Dynamic Change in URL of webservice configuration. Pin
Parwej Ahamad29-Jun-11 23:37
professionalParwej Ahamad29-Jun-11 23:37 
GeneralRe: Dynamic Change in URL of webservice configuration. Pin
Smart_Boy29-Jun-11 23:48
Smart_Boy29-Jun-11 23:48 
GeneralRe: Dynamic Change in URL of webservice configuration. Pin
Parwej Ahamad29-Jun-11 23:53
professionalParwej Ahamad29-Jun-11 23:53 
GeneralRe: Dynamic Change in URL of webservice configuration. Pin
Smart_Boy30-Jun-11 0:31
Smart_Boy30-Jun-11 0:31 
GeneralRe: Dynamic Change in URL of webservice configuration. Pin
surender.m30-Jun-11 1:21
surender.m30-Jun-11 1:21 
GeneralRe: Dynamic Change in URL of webservice configuration. Pin
Smart_Boy30-Jun-11 4:10
Smart_Boy30-Jun-11 4:10 
GeneralRe: Dynamic Change in URL of webservice configuration. Pin
Smart_Boy6-Jul-11 23:32
Smart_Boy6-Jul-11 23:32 
GeneralRe: Dynamic Change in URL of webservice configuration. Pin
Parwej Ahamad30-Jun-11 5:20
professionalParwej Ahamad30-Jun-11 5:20 
AnswerRe: Dynamic Change in URL of webservice configuration. Pin
RPA_AshishPandey30-Jun-11 18:57
RPA_AshishPandey30-Jun-11 18:57 
GeneralRe: Dynamic Change in URL of webservice configuration. Pin
Smart_Boy30-Jun-11 23:09
Smart_Boy30-Jun-11 23:09 
Questiononchange event not firing [solved] Pin
JimmyRopes29-Jun-11 16:33
professionalJimmyRopes29-Jun-11 16:33 
AnswerRe: onchange event not firing Pin
Anurag Gandhi29-Jun-11 20:46
professionalAnurag Gandhi29-Jun-11 20:46 
GeneralRe: onchange event not firing Pin
JimmyRopes30-Jun-11 0:48
professionalJimmyRopes30-Jun-11 0:48 
QuestionGet Current Identity value of the table using LINQ. Pin
madhubabu29-Jun-11 6:40
madhubabu29-Jun-11 6:40 

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.