|
javascript:abc('" + t.ClientID + "') use like. Today it will have to work.ok go on.
Devjit Das.
|
|
|
|
|
Yessssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
congratulate u have done it. if u don't mind where u r working. because i have seen u code project last six month.
Devjit Das.
|
|
|
|
|
function abc(a)
{
var b = document.getElementById(a);
alert(b.value);
return false;
}
protected void rowbound(object sender, GridViewRowEventArgs e)
{
Button b = (Button)e.Row.FindControl("update");
TextBox t = (TextBox)e.Row.FindControl("insettextbox");
if (b != null && t != null)
{
b.Attributes.Add("OnClick", "return javascript:abc('" + t.ClientID + "');");
}
}
i don;t want the postback after writing the return false.
anything is happening wrong?
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
use this one.
b.Attributes.Add("OnClick", "return javascript:abc('" + t.ClientID + "');return false;");
But tell me what u have write previous.
Devjit Das.
|
|
|
|
|
open my previous thread and u will see the efeect on ur machine.
Not getting u.
Devjit Das.
|
|
|
|
|
<script language="javascript" type="text/javascript">
function abc(a)
{
var b = document.getElementById(a);
alert(b.value);
return false;
}
</script>
protected void rowbound(object sender, GridViewRowEventArgs e)
{
Button b = (Button)e.Row.FindControl("update");
TextBox t = (TextBox)e.Row.FindControl("insettextbox");
if (b != null && t != null)
{
b.Attributes.Add("OnClick", "return javascript:abc('" + t.ClientID + "');");
}
}
i don;t want the postback after writing the return false.
anything is happening wrong?
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
Sonia Gupta wrote: b.Attributes.Add("OnClick", "return javascript:abc('" + t.ClientID + "');");
b.Attributes.Add("OnClick", "return abc('" + t.ClientID + "');");
please don't forget to vote on the post that helped you.
|
|
|
|
|
Thanks...........
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
b.Attributes.Add("onclick", "return abc('" + t.ClientID + "');return false;");
What u have write previous.
Devjit Das.
|
|
|
|
|
Obviously, subassembly is not a member of the grid view class. You have a button called p and a gridview called gridview1 ? *shudder*
Have you bought a book yet ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
button id named p is lying in the template of grid-view.
Some body presented me an ASp.net book
Author UnLeash
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
Sonia Gupta wrote: button id named p is lying in the template of grid-view.
So are you not able to find the control ?
|
|
|
|
|
Sonia Gupta wrote: button id named p is lying in the template of grid-view.
Yeah, I guessed that. It's still a terrible choice for a variable name. Try giving your variables descriptive names so others can read your code.
Sonia Gupta wrote: Some body presented me an ASp.net book
Author UnLeash
Awesome - some thing more entry level may have served you better, but the unleashed books tend to be very good.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
find button and Add attributes to button on Rowdatabound event of gridview.
if you want to check textbox value is empty or not then find textbox and add attributes to textbox.
for example
((TextBox)e.Row.FindControl("txtId")).Attributes.Add("OnBlur","return checkVal('"+((TextBox)e.Row.FindControl("txtId")).ClientID+"');");
Javascript Function
function checkVal(txtID)
{
if(document.getElementById(txtID).value=="")
{
alert('Please enter value')
return false;
}
else
{
return true;
}
}
Best regard
pAthan
please don't forget to vote on the post that helped you.
|
|
|
|
|
hi...
how should i access the button id which is placed in the template column of gridview.and i want to wite the funciton in javascript at source file.
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
Is there any option for this _AD_UserLogged_Name.Split(new char[] { '\\' }); to split a string without using substring.
Pandi
|
|
|
|
|
What do you want exactly ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I have an Add button which adds each row to the grid then while i click save i takes a bulk record and sends to stored procedure.So i have to take the content of gridview whenever an Add button is clicked.When paging is done I am not able to do that.Otherwise my code is working.
kavitha
|
|
|
|
|
Not clear if it is working. plz to check grid pageing if ur r missing something.
also check ispostback on form load.
Devjit Das.
|
|
|
|
|
I have a gridview ,i have done paging for that grid.In a method i have to retrieve all the records from gridview to datatable.It shows the error IndexOutofRange because page size is 5.Actually 12 records are there.What to do?
kavitha
|
|
|
|
|
Thavika wrote: It shows the error IndexOutofRange because page size is 5.Actually 12 records are there.What to do?
You obviously need to read the data source seperately if you want to access all the data and not just the stuff being shown by the grid.
Thavika wrote: :Re: Asp.net
Try to think of an intelligent, descriptive subject next time, pls. If everyone who posted an ASP.NET question put 'ASP.NET', how would that help ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
When I use a Master Page in website (asp.net) then this website not execute in IIS.
Display Error:
The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
--------------------------------------------------------------------------------
A name was started with an invalid character. Error processing resource 'http://localhost/Mcp1/Forms/Default2.aspx'. Line ...
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="...
|
|
|
|
|
Your post doesn't actually make sense, but I *think* you're saying you're using a master page and the page isn't loading ? That means you have errors in your page.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi I have a xml file like,
"
Books
Book ID="001"
Author Mark /Author
Publisher Sams /Publisher
/Book
Book ID="002"
Author Joe /Author
Publisher AWL /Publisher
/Book
Book ID="003"
Author James /Author
Publisher Spect /Publisher
/Book
Book ID="004"
Author Thomos /Author
Publisher McHill /Publisher
/Book
/Books
"
My form has Three Text boxes to display BookId,Author and Publisher and
also four Buttons with names First, Next, Previous and Last resp.
Now what my question is I want to get the data from xml file and display in textboxes for the respective button events without using any dataset by using Xml Objects.
It may be looks simple for someone, I'm new to XML
Thanks
Hari
|
|
|
|