|
How can i capture click event of generated button?????
Neeraj Rawat
|
|
|
|
|
NeerajSmart wrote: I am generating textboxes and buttons generated on runtime
1 - Are you adding controls to a content place holder ?
2 - In which event your dynamic controls are created ?
|
|
|
|
|
hey don,t thanx in advance try it first
double click on button then fire the query to saving data in database table
ok byeeee
lucky
|
|
|
|
|
I have moved the values from one listbox to another listbox by using Javascript. How can I reterive the values from the second listbox in server side ie., code behind? Because i will store the selected values in DB.
|
|
|
|
|
Looping through second Listbox.Item.Count and get selected values by using condition if listbox.Items[index].Selected is true then store them in DB
Best Regard
Pathan
---------------------------------------------------
|
|
|
|
|
Hi All,
I have a Grid View which displays the product details using an SqlDataSource.I have an associated Details View through which I am inserting and editing Product Details using another SqlDataSource.The problem is whenever I insert a record into products the values are properly inserted and reflected in the grid but immediately after insertion, whenever i refresh the page the same record is getting inserted again.Why is it so?How wud I stop this.
Any small help in this regard wud be appreciated
Thanks
Haasini
|
|
|
|
|
Redirect the same page after inserting record
or
do not store Duplicate data in database using project Title or any other column name
Best Regard
---------------------------------------------------
|
|
|
|
|
Thanks a Ton Imran..
Its working perfectly fine..
Regards
Haasini
|
|
|
|
|
I have made one master page say master.aspx which is in the folder (ub/Forms/Common Forms/master.aspx) and has child form form1.aspx which is in the same folder(Forms/Common Forms/form1.aspx). I have included one image say image1.jpg which is in the folder(ub/images/common image/image1.jpg) in the master.aspx.Now when i run the form1.aspx, all the properties of master page comes except image1.jpg. The image1.jpg doesn't come.But when i take another child form say form2.aspx which is in the folder(/ub/form2.aspx),it shows all the properties of master.aspx including image1.jpg. But i want to show in form1.aspx...It's not working..Why so ??? How to solve it ?
suchitamanandhar@hotmail.com
|
|
|
|
|
maybe. try like that ../common image/image1.jpg (two dots)
OR
Use the full path (http://yoursite.com/ub/images/common image/image1.jpg )
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
hey guy
take a contentpanel in ur form then
retreive the masterpage in ur form
images automatically display in ur form
lucky
|
|
|
|
|
Hi.
From Database i m getting data in this format.
CAC PAT A 12/03/07
CAC PAT A 12/04/07
CAC PAT A 12/05/07
CMP CAT B 11/03/07
CMP CAT B 11/06/07
CMP CAT B 11/08/07
CPL AMT C 10/01/07
CPL AMT C 10/04/07
CPL AMT C 10/06/07
I want to display like that
CAC PAT A 12/03/07
12/04/07
12/05/07
CMP CAT B 11/03/07
11/06/07
11/08/07
CPL AMT C 10/01/07
10/04/07
10/06/07
How to do ?
Help me
Thanks
|
|
|
|
|
Use ItemDataBound Event of GridView.
|
|
|
|
|
thanks for reply
can you explain it
thanks
|
|
|
|
|
Try this is the code which i used for it.
private void DG_ItemDataBound(object o, DataGridItemEventArgs e)<br />
{ <br />
if (e.Item.ItemType == ListItemType.Item<br />
|| e.Item.ItemType == ListItemType.AlternatingItem)<br />
{<br />
TableCell cell = (e.Item.Controls[0] as TableCell);<br />
cell.Width = new Unit("120px");<br />
cell.Style["border-right"] = "2px solid #666666";<br />
cell.BackColor = System.Drawing.Color.LightGray;<br />
<br />
for(int i=1; i<e.Item.Controls.Count; i++)<br />
{<br />
cell = (e.Item.Controls[i] as TableCell);<br />
<br />
cell.HorizontalAlign = HorizontalAlign.Right;<br />
cell.Width = new Unit("90px");<br />
<br />
if (i % 2 == 1)<br />
cell.BackColor <br />
= System.Drawing.ColorTranslator.FromHtml("#EFEFEF");<br />
<br />
if (GetCellValue(cell) >= 8000)<br />
{<br />
cell.Font.Bold = true;<br />
cell.BorderWidth = new Unit("1px");<br />
cell.BorderColor = System.Drawing.Color.Gray;<br />
cell.BorderStyle = BorderStyle.Dotted;<br />
cell.BackColor = System.Drawing.Color.Honeydew;<br />
}<br />
<br />
} <br />
<br />
}<br />
<br />
if (e.Item.ItemType == ListItemType.Header)<br />
{<br />
foreach (TableCell cell in e.Item.Controls)<br />
{<br />
cell.Style["border-bottom"] = "2px solid #666666";<br />
cell.BackColor=System.Drawing.Color.LightGray;<br />
}<br />
}<br />
<br />
}
It is an Example only try it with your specs.
SSK.
|
|
|
|
|
Exactly copied from this[^]. Shame on you
|
|
|
|
|
Item Data Bound is the event which is fired before u bind the GridView Control, so either u can fire a query where u will get the ID and Different dates and then match that ID with the e.Row.Cells[0].Text and do something like this:
e.Row.Cells[1].Text= //Put all the different date in a string variable separated by
Before this u will have to write the above code in this if statement:
if (e.Row.RowType == DataControlRowType.DataRow)
{
}
I am not sure about the syntax. But u can get it.
Hope u understood the code.
|
|
|
|
|
hey guy first of all where u want to display the format in crystal or other if in crystal report make a group go to group insert group select the datatable column name it will be work.
byeeeeeeeee
lucky
|
|
|
|
|
Is it possible that i enter a date in other format than Gregorian and upon tab for example change it to its equivillant in Gregorian.
thanks
|
|
|
|
|
|
Can you please tell me how?
Thanks
|
|
|
|
|
Hi ,
i am using the following code in html to play videos in media player. But i want to give the filename based on the value present in radiobuttonlist. But how to do this? I am confused. Any help ?
<object id="mediaplayer" classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" style="width: 216px; height: 168px">
<param name="FileName" value="funny.wmv" />
Chaitra N
|
|
|
|
|
<a href = "http://www.killersites.com/mvnforum/mvnforum/viewthread?thread=3602#18305" rel="nofollow">http://www.killersites.com/mvnforum/mvnforum/viewthread?thread=3602#18305</a>
<pre>
<script type="text/javascript">
function play(media){
document.getElementById('mediaplayer').innerHTML=
'<object classid="clsid:22d6f312-b0f6-11d0-94ab-0080c74c7e95"'
+'type="application/x-oleobject" width="320" height="285">'
+'<param name="showControls" value="false">'
+'<param name="fileName" value="'+media+'">'
+'<embed type="application/x-mplayer2" width="320" height="285"'
+'showcontrols="false" src="'+media+'"><\/embed><\/object>'
}
</script>
Add this to the CSS:
#mediaplayer {
width: 320px;
height: 285px;
background: #000;
}
And put this in the html where you want the videos to play and menu:
<div id="mediaplayer"></div>
<ul id="menu">
<li><a onclick="play("<b>mymovie1.wmv</b>");return false" href="">Movie 1</a></li>
<li><a onclick="play("<b>mymovie2.wmv</b>");return false" href="">Movie 2</a></li>
</ul></pre>
<b>Note that OBJECT tag won't work on Firefox. </b>
Edit: Text editor is really bad for posting code..
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
Hi Michael,
The code i sent is working fine but i want it to get displayed based on the title present in bulletedlist.
See I am storing the path of the video files in my database. I am using the following code to retrieve the path of the file. What I am finding difficult is to assign that path to the " filename " of the mediaplayer object
Protected Sub Show_Products(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.BulletedListEventArgs) Handles BulletedList1.Click
Dim SQLString As String = "SELECT filepath FROM pictures WHERE title = '" & BulletedList1.Items(e.Index).Text & "'"
Dim dr As Data.SqlClient.SqlDataReader
Dim comm As New Data.SqlClient.SqlCommand(SQLString, dbconn)
If dbconn.State <> ConnectionState.Open Then
dbconn.Open()
End If
Dim str As String
dr = comm.ExecuteReader
While dr.Read
str = dr.Item(0)
End While
dr.Close()
str = str
End Sub
|
|
|
|
|
Hi all,
i need a validation rule for date dd/MM/yyyy that applies rule of leap year.
thanks
|
|
|
|