Click here to Skip to main content
15,887,027 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: ASP.Net MVC File upload Pin
Dani_el1-Sep-16 4:16
Dani_el1-Sep-16 4:16 
GeneralRe: ASP.Net MVC File upload Pin
Simon_Whale1-Sep-16 4:21
Simon_Whale1-Sep-16 4:21 
GeneralRe: ASP.Net MVC File upload Pin
NotPolitcallyCorrect1-Sep-16 4:34
NotPolitcallyCorrect1-Sep-16 4:34 
QuestionInvoking GetIPGlobalProperties from Unmanaged Application Pin
Derek Tortonian29-Aug-16 12:28
Derek Tortonian29-Aug-16 12:28 
AnswerRe: Invoking GetIPGlobalProperties from Unmanaged Application Pin
#realJSOP31-Aug-16 3:22
mve#realJSOP31-Aug-16 3:22 
GeneralRe: Invoking GetIPGlobalProperties from Unmanaged Application Pin
Derek Tortonian31-Aug-16 10:22
Derek Tortonian31-Aug-16 10:22 
AnswerRe: Invoking GetIPGlobalProperties from Unmanaged Application Pin
#realJSOP7-Sep-16 1:29
mve#realJSOP7-Sep-16 1:29 
QuestionCalling e.Row.Parent.ClientID generate another ID for its GridView Pin
Andrés Leiva23-Aug-16 6:51
Andrés Leiva23-Aug-16 6:51 
Greetings...
The problem is simple: In a ASP.NET GridView, if the property e.Row.Parent.ClientID is used in the RowDataBound event, .NET generates another identifier for the GridView, and if you had javascripts in your page that used the ClientID for the GridView, they wont work.

To replicate the problem, you have to create a WebForm with one GridView, one Client HTML Button has to access the GridView identifier like this:

<input id="Button1" type="button" value="Test" onclick="alert('The next message does not have to be null: ' + document.getElementById('<%=gridViewTest.ClientID %>'))" />

If in gridViewTest_RowDataBound you don't use the e.Row.Parent.ClientID property, everything will be fine, but if you use e.Row.Parent.ClientID for some purpose, .NET will generate another ID for the GridView and the HTML Button will not work anymore.

Is that the expected behavior, or it is a bug?

modified 24-Aug-16 10:00am.

AnswerRe: Calling e.Row.Parent.ClientID generate another ID for its GridView Pin
Pete O'Hanlon24-Aug-16 0:01
mvePete O'Hanlon24-Aug-16 0:01 
GeneralRe: Calling e.Row.Parent.ClientID generate another ID for its GridView Pin
Andrés Leiva24-Aug-16 4:07
Andrés Leiva24-Aug-16 4:07 
GeneralRe: Calling e.Row.Parent.ClientID generate another ID for its GridView Pin
Pete O'Hanlon24-Aug-16 5:21
mvePete O'Hanlon24-Aug-16 5:21 
QuestionAssembly - SQL Server 2008 Pin
equelna21-Aug-16 23:30
equelna21-Aug-16 23:30 
AnswerRe: Assembly - SQL Server 2008 Pin
Richard Deeming22-Aug-16 2:00
mveRichard Deeming22-Aug-16 2:00 
GeneralRe: Assembly - SQL Server 2008 Pin
equelna22-Aug-16 4:41
equelna22-Aug-16 4:41 
GeneralRe: Assembly - SQL Server 2008 Pin
Richard Deeming22-Aug-16 10:01
mveRichard Deeming22-Aug-16 10:01 
Question_Type.GetProperty Pin
Derek Tortonian19-Aug-16 10:40
Derek Tortonian19-Aug-16 10:40 
AnswerRe: _Type.GetProperty Pin
Gerry Schmitz20-Aug-16 4:25
mveGerry Schmitz20-Aug-16 4:25 
QuestionString was not recognized as a valid DateTime. Pin
abdul subhan mohammed14-Aug-16 21:15
professionalabdul subhan mohammed14-Aug-16 21:15 
AnswerRe: String was not recognized as a valid DateTime. Pin
Richard MacCutchan14-Aug-16 21:16
mveRichard MacCutchan14-Aug-16 21:16 
GeneralRe: String was not recognized as a valid DateTime. Pin
abdul subhan mohammed14-Aug-16 21:20
professionalabdul subhan mohammed14-Aug-16 21:20 
AnswerRe: String was not recognized as a valid DateTime. Pin
Slacker00717-Aug-16 1:18
professionalSlacker00717-Aug-16 1:18 
GeneralRe: String was not recognized as a valid DateTime. Pin
#realJSOP17-Aug-16 3:05
mve#realJSOP17-Aug-16 3:05 
GeneralRe: String was not recognized as a valid DateTime. Pin
Slacker00717-Aug-16 3:39
professionalSlacker00717-Aug-16 3:39 
GeneralRe: String was not recognized as a valid DateTime. Pin
#realJSOP17-Aug-16 4:25
mve#realJSOP17-Aug-16 4:25 
GeneralRe: String was not recognized as a valid DateTime. Pin
Slacker00717-Aug-16 4:32
professionalSlacker00717-Aug-16 4:32 

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.