|
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.
|
|
|
|
|
Hi all,
I have a problem right now. I want to make a dll with one or two functions. Than i want to deploy that dll on my applications client machines for security purpose. when a machine having that dll will try to browse my applicaation, first i will call a method from the dll that is present on the machine. if i got the response than i will allow that machine to check my application.
I have already browsed Richard Birkby article, but he didn't explain about invoke.dll and how to run the application.
See if someone can help me.
Thanks
Faisal
|
|
|
|
|
You can write a .NET, ActiveX or Java control which runs on the client. You can't just deploy a dll to your client machine and run it from your web app.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
I think for that activex i don't need to install framework or any other installation on client machine??
|
|
|
|
|
You should install that activex control. It works on client side.
|
|
|
|
|
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
|
|
|
|
|
Hi,
How can we databind an HTML Input type Text control? I'm using a DHTML calendar in my formview's EditTemplate and this calendar needs a HTML text control, not an ASP.NET TextBox server control. But I cannot bind my Input text which get a date from user because it doesn't accept the Bind() method.
Any idea what I'm doing wrong here?
Regards,
Blumen
|
|
|
|