|
Yes. If onclientclick returns false, the onclick will not run.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
Yes, because I've done the following...
Developer's Notes
Hoep this help, Signed... Linda S.
xxx
|
|
|
|
|
i have grid view in which i have allow paging.......so i have 10 pages.123456789...n so on
to get all pages i hv write the code as follwes.
protected void grdvwUpdt_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
DataTable dsAllUpdtblData = ViewState["dvAllUpdtblData"] as DataTable;
grdvwUpdt.PageIndex = e.NewPageIndex;
grdvwUpdt.DataSource = dsAllUpdtblData;
grdvwUpdt.DataBind();
}
when i click on any no ....it dnt show any change.....it must hv to give remaining record...but it didnt shoe tht
why?
|
|
|
|
|
In page Index Changing no need to rebind gridview.
Only this much is enough
grdvwUpdt.PageIndex = e.NewPageIndex;
|
|
|
|
|
still not working .........
|
|
|
|
|
You use your earlier code.That is rebind the grid after changing the page index and insert breakpoints .Check whether control is passing correctly or not.
|
|
|
|
|
debugger going inside the event.....but nthing get happen
|
|
|
|
|
hi,
try giving the same code in PageIndexChanging event of grid
T.Balaji
|
|
|
|
|
i have use pageIndexchanging only....
|
|
|
|
|
Here is the code. You need to create the session of the gridview at the time of binding the data
public void BindData()
{
DataSet dsItemList = objConfig.GetItemList();
grdItemList.DataSource = dsItemList;
grdItemList.DataBind();
Session["grd_ItemList"] = dsItemList; }
After creating the session use that session in ur page indexchanging method
protected void grdItemList_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
grdItemList.PageIndex = e.NewPageIndex;
if (Session["grd_ItemList"] != null)
{
grdItemList.DataSource = Session["grd_ItemList"];
grdItemList.DataBind();
}
Session["grd_ItemList"] = null;//end the session
}
|
|
|
|
|
Hi,
I am creating an web application in asp.net and the requirement is that I have to hide a FileUpload or INPUT(File) on button click using JavaScript . I tried a lot but I didn't get the success . Please help me regarding this. Thank You
|
|
|
|
|
Put it in a div and hide that. Do you know how to hide a control with js at all ?
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
Sorry.... But I don't know how to hide controls in js. So I also don't know how to hide it through put it in <div>.
|
|
|
|
|
astrovirgin wrote: But I don't know how to hide controls in js
Do you know how to google? if no, CG's article[^] should help.
to toggle the visibility follow these steps,
1 - Get the div using document.getElementById(divId)
2 - Set style.display = 'none' to hide and style.display = 'block' to show.
|
|
|
|
|
in vb i hv done following.......
trWorkAssigned.Style("Display") = "Inline"
tdUpdtInvCoid.Style("Display") = "none"
i want to use tht coding in c#
how i will use tht?
|
|
|
|
|
Replace () with [].
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
trWorkAssigned.Style.Add("Display", "Inline");
tdUpdtInvCoid.Style.Add("Display", "none");
i hv use like this...
is tht right?
|
|
|
|
|
That works too.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
which one method will be used in vb.net to play media file i.e(sound1.mp3 ) passed as parameter to that method
|
|
|
|
|
You embedd WMP in your page as an activeX object.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
hi,
To play a media file u can make use of 'Embed' control.
set src property of embed tag to path of the file then it will play.
regards,
|
|
|
|
|
Hi all,
iam not able to figure out what i have to do for displaying related record details inside formveiew on linkbutton click . i have added seperate linkbutton for each reservation and wants to display record details inside formview but problem is that only single record is displaying on all linkbutton clck
i have seven records in table .
here is my code
sqlcmd.CommandText = "Select Reserve_ID from Reservedvehicle"
sqlcmd.Connection = sqlconn
Dim sqlrdr As SqlDataReader = sqlcmd.ExecuteReader
While sqlrdr.Read()
Dim tblcell As TableCell = New TableCell()
Dim tblrow As TableRow = New TableRow()
Dim lnk As New LinkButton
lnk.Text = "click here for details "
lnk.CommandArgument = (sqlrdr("Reserve_ID"))
'add Click functionaliuty
AddHandler lnk.Command, AddressOf OnClickLink
tblcell.Controls.Add(lnk)
tblrow.Cells.Add(tblcell)
Table1.Rows.Add(tblrow)
End While
sqlrdr.Close()
Here is event handler :
Protected Sub OnClickLink(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.CommandEventArgs)
Dim lnkbutton As linkbutton = sender
Dim param As String = e.CommandArgument
FormView1.Visible = True
Dim myConnection As New SqlConnection("Server=localhost;Database=Reservation;uid=sa;pwd=server")
Dim ad As New SqlDataAdapter("SELECT * FROM reservedvehicle ", myConnection)
Dim ds As New DataSet()
ad.Fill(ds)
FormView1.DataSource = ds
FormView1.DataBind()
End Sub
can any body guide me what i have to do to reslove this issue .
Best Regards
Rameez
|
|
|
|
|
DetailView/FormView are designed to show single record at a time. User GridView instead.
|
|
|
|
|
Hi,
U hv properly coded but while retrieving data from Db to binding Formview u r not sending the Command Argument(Reserve_id) to Db.If u send that u can retrieve particular record based on reserve_id
|
|
|
|
|
Though DetailsView/FormView displays one record at a time, you may enable paging for these controls.. Thus user can navigate and view all the records, but one at a time.
|
|
|
|