Click here to Skip to main content
15,884,388 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Javascript code for check duplicate username Pin
Manas Bhardwaj5-Sep-09 0:41
professionalManas Bhardwaj5-Sep-09 0:41 
Questionmenuitems Pin
mylogics4-Sep-09 22:07
professionalmylogics4-Sep-09 22:07 
AnswerRe: menuitems Pin
Abhijit Jana4-Sep-09 22:16
professionalAbhijit Jana4-Sep-09 22:16 
AnswerRe: menuitems Pin
tagyurit5-Sep-09 3:55
tagyurit5-Sep-09 3:55 
QuestionQuestion About Storing Objects in the Session Variable Pin
MarkMokris4-Sep-09 12:56
MarkMokris4-Sep-09 12:56 
AnswerRe: Question About Storing Objects in the Session Variable Pin
Christian Graus4-Sep-09 13:14
protectorChristian Graus4-Sep-09 13:14 
AnswerRe: Question About Storing Objects in the Session Variable Pin
tagyurit4-Sep-09 16:52
tagyurit4-Sep-09 16:52 
GeneralRe: Question About Storing Objects in the Session Variable Pin
MarkMokris5-Sep-09 2:45
MarkMokris5-Sep-09 2:45 
GeneralRe: Question About Storing Objects in the Session Variable Pin
tagyurit5-Sep-09 3:53
tagyurit5-Sep-09 3:53 
GeneralRe: Question About Storing Objects in the Session Variable Pin
MarkMokris6-Sep-09 3:36
MarkMokris6-Sep-09 3:36 
Questiongridview buttons and client side scripting Pin
compninja254-Sep-09 9:28
compninja254-Sep-09 9:28 
AnswerRe: gridview buttons and client side scripting Pin
Abhishek Sur4-Sep-09 9:48
professionalAbhishek Sur4-Sep-09 9:48 
GeneralRe: gridview buttons and client side scripting Pin
compninja254-Sep-09 9:50
compninja254-Sep-09 9:50 
GeneralRe: gridview buttons and client side scripting Pin
Abhishek Sur4-Sep-09 11:16
professionalAbhishek Sur4-Sep-09 11:16 
GeneralRe: gridview buttons and client side scripting Pin
compninja258-Sep-09 3:29
compninja258-Sep-09 3:29 
GeneralRe: gridview buttons and client side scripting Pin
Abhishek Sur8-Sep-09 10:59
professionalAbhishek Sur8-Sep-09 10:59 
GeneralRe: gridview buttons and client side scripting Pin
compninja259-Sep-09 10:19
compninja259-Sep-09 10:19 
GeneralRe: gridview buttons and client side scripting Pin
Abhishek Sur10-Sep-09 0:39
professionalAbhishek Sur10-Sep-09 0:39 
GeneralRe: gridview buttons and client side scripting Pin
compninja2510-Sep-09 2:51
compninja2510-Sep-09 2:51 
dang..it is calling the javascript but still issuing the post back to the server and throwing a validation error. I did view the source and I believe the problem lies in the fact that all of the buttons are of type "submit". Is there a way I can programatically change them to type="button" instead? I tried button.Attributes.Add("type", "button") but they are still ending up in the browser as type="submit". Doesn't make any sense. I've seen a ton of forums and articles now indicating that what you've suggested should just work.
[UPDATE] It dawned on me that it was probably because I never changed the UseSubmitBehavior parameter on the button. If I change this to false, then the javascript fires without trying to submit, however it is still posting back and refreshing the page, causing my javascript changes to dissapear during the server's page load. The only way I've found so far to keep the page from refreshing is adding the PostBackURL parameter, but if I do that then all of my buttons on the page seem to "inherit" this and then they won't work. grr!

if (e.Row.RowType == DataControlRowType.DataRow)
           {
               Label lb1 = (Label)e.Row.FindControl("label1");
               Button btminus = (Button)e.Row.FindControl("minus_qty");
               btminus.UseSubmitBehavior = false;
               btminus.Attributes.Add("onclick", "javascript:decreaseQuantity('" + lb1.ClientID + "');");
               Button btplus = (Button)e.Row.FindControl("plus_qty");
               btplus.UseSubmitBehavior = false;
               btplus.Attributes.Add("onclick", "javascript:increaseQuantity('" + lb1.ClientID + "');");
           }


Knowledge is not power, however, the acquisition and appropriate application of knowledge can make you a very powerful individual.

QuestionDocument elements have no IDs Pin
Lonnie Raffray4-Sep-09 8:04
Lonnie Raffray4-Sep-09 8:04 
AnswerRe: Document elements have no IDs Pin
Abhishek Sur4-Sep-09 9:35
professionalAbhishek Sur4-Sep-09 9:35 
GeneralRe: Document elements have no IDs Pin
Lonnie Raffray4-Sep-09 9:37
Lonnie Raffray4-Sep-09 9:37 
GeneralRe: Document elements have no IDs Pin
Abhishek Sur4-Sep-09 9:39
professionalAbhishek Sur4-Sep-09 9:39 
QuestionLink button inside the Gridview Pin
Vimalsoft(Pty) Ltd4-Sep-09 4:13
professionalVimalsoft(Pty) Ltd4-Sep-09 4:13 
AnswerRe: Link button inside the Gridview Pin
Blue_Boy4-Sep-09 5:45
Blue_Boy4-Sep-09 5:45 

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.