Click here to Skip to main content
15,921,577 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: ISPostBack is TRUE when going to the page even at first time Pin
NeverHeardOfMe12-Jul-10 1:43
NeverHeardOfMe12-Jul-10 1:43 
GeneralRe: ISPostBack is TRUE when going to the page even at first time Pin
AnandDesai1912-Jul-10 1:47
AnandDesai1912-Jul-10 1:47 
GeneralRe: ISPostBack is TRUE when going to the page even at first time Pin
Not Active12-Jul-10 2:26
mentorNot Active12-Jul-10 2:26 
GeneralRe: ISPostBack is TRUE when going to the page even at first time Pin
NeverHeardOfMe12-Jul-10 2:34
NeverHeardOfMe12-Jul-10 2:34 
GeneralRe: ISPostBack is TRUE when going to the page even at first time Pin
AnandDesai1912-Jul-10 1:54
AnandDesai1912-Jul-10 1:54 
GeneralRe: ISPostBack is TRUE when going to the page even at first time Pin
Not Active12-Jul-10 2:31
mentorNot Active12-Jul-10 2:31 
GeneralRe: ISPostBack is TRUE when going to the page even at first time Pin
NeverHeardOfMe12-Jul-10 4:38
NeverHeardOfMe12-Jul-10 4:38 
GeneralRe: ISPostBack is TRUE when going to the page even at first time Pin
Not Active12-Jul-10 5:00
mentorNot Active12-Jul-10 5:00 
AnswerRe: ISPostBack is TRUE when going to the page even at first time Pin
SomeGuyThatIsMe12-Jul-10 4:14
SomeGuyThatIsMe12-Jul-10 4:14 
AnswerRe: ISPostBack is TRUE when going to the page even at first time Pin
T M Gray12-Jul-10 11:05
T M Gray12-Jul-10 11:05 
QuestionDoubts regarind user management Pin
cooljeba111-Jul-10 23:06
cooljeba111-Jul-10 23:06 
AnswerRe: Doubts regarind user management Pin
JHizzle11-Jul-10 23:34
JHizzle11-Jul-10 23:34 
GeneralRe: Doubts regarind user management Pin
cooljeba112-Jul-10 2:50
cooljeba112-Jul-10 2:50 
QuestionHow to Call javascript function by clicking on Gridview link button Pin
cheguri11-Jul-10 20:39
cheguri11-Jul-10 20:39 
AnswerRe: How to Call javascript function by clicking on Gridview link button Pin
Peace ON11-Jul-10 20:51
Peace ON11-Jul-10 20:51 
GeneralRe: How to Call javascript function by clicking on Gridview link button Pin
NeverHeardOfMe12-Jul-10 1:45
NeverHeardOfMe12-Jul-10 1:45 
This isn't going to help with calling a funciton dependent upon the underlying data row....

Assuming you want to create a specific Javascript call for each row, dependent on (say) the row ID of the underlying dataview, you would do better to use a ButtonColumn:

<asp:ButtonColumn ButtonType="LinkButton" CommandName="doesnt_matter" Text="whatever" />

and add your JavaScript fucntion in the page's head:

function fname(r) {
alert('You clicked row with ID# ' + r);
}


and bind this in the ItemDataBound event:

If e.Item.ItemType = ListItemType.Item Or e.Item.ItemType = ListItemType.AlternatingItem Then
Dim dr As DataRow = e.Item.DataItem.Row
Dim js As String
Dim btn As LinkButton = e.Item.Cells(X).Controls(0) ' replace "X" by the appropriate column index
js = "fname(" & CStr(dr("ID")) & ")"; return false;"
btn.Attributes.Add("onclick", js)
End If

NB the extra "return false" statement - this prevents the link-button from posting the entire form back to the server.

btw, OP: re "It's very urgent."

Please don't put this sort of thing in your posts. That is no-one's problem but yours.
QuestionGridview not getting updated Pin
_______________________11-Jul-10 19:54
_______________________11-Jul-10 19:54 
AnswerRe: Gridview not getting updated Pin
AnandDesai1912-Jul-10 0:59
AnandDesai1912-Jul-10 0:59 
AnswerRe: Gridview not getting updated Pin
AnandDesai1912-Jul-10 1:05
AnandDesai1912-Jul-10 1:05 
QuestionGridview-checkbox Pin
amitamit09910-Jul-10 20:32
amitamit09910-Jul-10 20:32 
AnswerRe: Gridview-checkbox Pin
Not Active11-Jul-10 3:20
mentorNot Active11-Jul-10 3:20 
GeneralRe: Gridview-checkbox Pin
amitamit09911-Jul-10 19:24
amitamit09911-Jul-10 19:24 
AnswerRe: Gridview-checkbox Pin
Mangesh412-Jul-10 1:43
Mangesh412-Jul-10 1:43 
QuestionMessage Removed Pin
9-Jul-10 21:00
Mansi Arora9-Jul-10 21:00 
AnswerRe: How to Read ID and Value of dynamic buttons on submit button click Pin
Sandeep Mewara10-Jul-10 3:28
mveSandeep Mewara10-Jul-10 3:28 

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.