|
plz guide me in code level
|
|
|
|
|
kathyani wrote: string Course_Instance_Item_ID = ((TextBox)GridView1.Rows[e.RowIndex].Cells[2].Controls[0]).Text;
look at the line of code above...
You are casting the contents of this cell to a textbox. If the gridView is rendering this cell as a link, then this is the cause of the error.
Look at your grid, work out which one of those values is displayed as a link, thats your offending line of code, probably needs the cell index changing.
---Guy H ---
|
|
|
|
|
Hi,
I am creating Family tree.
My final tree node is grategreatgrandfather
Now I want to show a tree on the form.
1
/ \
2 3
/ \ /\
4 5 6 7
So is there any control in .net or any solution to display like this.
Any other display will also acceptable.
Thanks
|
|
|
|
|
The only thing I can think of is the treeview control but it wont look exactly like that
|
|
|
|
|
I have an GridView inside Web User Control (.ascx), and i want to export that Gridview to Excel file. anybody have idea ?
Thx
|
|
|
|
|
try this code
protected void Button1_Click(object sender, EventArgs e)
{
Response.Clear();
Response.AddHeader("content-disposition", "attachment;
filename=FileName.xls");
Response.Charset = "";
// If you want the option to open the Excel file without saving than
// comment out the line below
// Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.ContentType = "application/vnd.xls";
System.IO.StringWriter stringWrite = new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter htmlWrite =
new HtmlTextWriter(stringWrite);
GridView1.RenderControl(htmlWrite);
Response.Write(stringWrite.ToString());
Response.End();
}
|
|
|
|
|
Hi Dude
Go to google and try it.
if u didn;t get code post msg i will send u the code
|
|
|
|
|
Does LDAP have anything to do with Active Directoy? Do I need to have AD in place in order to use LDAP? If I move a web app to our extranet(DMZ) and want to use LDAP instead of AD is that possible? What do I need physically on the network in order to use LDAP for authentication in my extranet?
DNM
|
|
|
|
|
Hi
Is any one have javascript wich converts English to French
Thanks
SIva
|
|
|
|
|
|
Hi
I want to convert english to french what ever i enter in a textbox.
the conversion will be on onblur event.
I think we can do this by java script.
Do u have any script like this.
thanks
|
|
|
|
|
|
do u know how to to convert
|
|
|
|
|
Best question of the day !!!
Thanks,
Arindam D Tewary
|
|
|
|
|
Converts what? The interface? Information entered by the user? You need to specify more information - oh, and automatic translation from one language to another is very, very complex - way beyond the scope of what you can easily accomplish in a web page without creating a huge download.
|
|
|
|
|
Hi
I want to convert english to french what ever i enter in a textbox.
the conversion will be on onblur event.
I think we can do this by java script.
Do u have any script like this.
thanks
|
|
|
|
|
bommareddy200 wrote: Do u have any script like this.
Nope. But these[^] might.
|
|
|
|
|
Hi
I am looking for some examples or templates of website and software designs,
Does anyone know any good websites?
thanks
|
|
|
|
|
|
|
Hi. I've created a silverlight applicatin in VS 2008. Now I've created a simple login control containg two text boxes & a Button. Now i've added this user control in the Page.Xaml page. In asp.net application, I've added a default.aspx page & put following code in the html part -
<%@ Register Assembly="System.Web.Silverlight" Namespace="System.Web.UI.SilverlightControls" TagPrefix="asp" %><asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> <div style="height: 100%;" id="g"> <asp:Silverlight ID="Xaml1" runat="server" Source="~/ClientBin/Debug/Vista Style Button.xap" MinimumVersion="2.0.30523" Width="100%" Height="100%" /> </div>
now i want to access values of two text boxes in the Page_Load Event of the Default.aspx. Can any one help me?
|
|
|
|
|
I think you can use FindControl for that, not sure though
|
|
|
|
|
Hi All! I want to record audio using silverlight. can any one has idea about it?
|
|
|
|
|
I have developed an asp.net page that used to download videos been uploaded by the user, the code for that page as following:
=================================================================================================
]]>
<asp:content id="Content1" contentplaceholderid="ContentPlaceHolder1" runat="Server" xmlns:asp="#unknown">
List of Available Vedios to Download | <asp:gridview id="dgvvediocollection" runat="server" allowpaging="True" autogeneratecolumns="False">
BackColor="White" BorderStyle="Solid" BorderWidth="1px" CellPadding="3" ForeColor="Black"
GridLines="Vertical" Width="80%" EmptyDataText="No Records Found">
<pagersettings firstpagetext="First" lastpagetext="Last" nextpagetext="Next" previouspagetext="Prev">
<footerstyle backcolor="#CCCCCC">
<columns> <asp:boundfield datafield="filename" headertext="Vedio Name">
<controlstyle width="30%">
<itemstyle horizontalalign="Center" width="40%">
<headerstyle horizontalalign="Center">
<asp:boundfield datafield="type" headertext="Vedio Type">
<controlstyle width="30%">
<itemstyle horizontalalign="Center" width="40%">
<headerstyle horizontalalign="Center">
<asp:buttonfield buttontype="Button" commandname="download" headertext="Action" text="Download">
<controlstyle backcolor="LightSkyBlue" font-bold="True" forecolor="Black">
<itemstyle width="20%">
<selectedrowstyle backcolor="#000099" font-bold="True" forecolor="White">
<pagerstyle backcolor="White" forecolor="Black" horizontalalign="Right">
<headerstyle backcolor="Black" font-bold="True" forecolor="White">
<alternatingrowstyle backcolor="#CCCCCC">
|
====================================================================================
Imports System
Imports System.Data
Imports System.Configuration
Imports System.Collections
Imports System.Web
Imports System.Web.Security
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Web.UI.WebControls.WebParts
Imports System.Web.UI.HtmlControls
Imports System.Data.SqlClient
Imports System.IO
Partial Class PodCost
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If (Not IsPostBack) Then
Dim User As String = Session("UserName").ToString()
BindVedioData()
End If
End Sub
Protected Sub dgvvediocollection_RowCommand(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCommandEventArgs) Handles dgvvediocollection.RowCommand
If (e.CommandName = "download") Then
Dim i As Integer = Convert.ToInt32(e.CommandArgument)
Dim str As String = dgvvediocollection.Rows(i).Cells(0).Text
downloadfile(str)
End If
End Sub
Private Sub BindVedioData()
Dim conn As New SqlConnection(ConfigurationManager.ConnectionStrings("dbconnection").ConnectionString)
Dim str As String = "select substring(PlayListUrl,8,len(PlayListUrl)) as filename,VideoType as type from PlayList"
Dim da As SqlDataAdapter = New SqlDataAdapter(str, conn)
Dim ds As DataSet = New DataSet()
da.Fill(ds)
If (ds.Tables(0).Rows.Count > 0) Then
dgvvediocollection.DataSource = ds.Tables(0)
dgvvediocollection.DataBind()
End If
End Sub
Private Sub downloadfile(ByVal filename As String)
Dim filepath As String = Server.MapPath("Videos") & "\" & filename
If Not filepath Is Nothing Then
If File.Exists(filepath) Then
Response.Clear()
Response.ContentType = "application/octet-stream"
Response.AddHeader("Content-Disposition", _
"attachment; filename=""" & filename & """")
Response.Flush()
Response.WriteFile(filepath)
End If
End If
End Sub
Protected Sub dgvvediocollection_PageIndexChanging(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewPageEventArgs) Handles dgvvediocollection.PageIndexChanging
dgvvediocollection.PageIndex = e.NewPageIndex
BindVedioData()
End Sub
End Class
===================================================================================================
please help to write RSS feed for that code.
Thanks a lot
|
|
|
|
|
Where do you want the rss feed to come from?
check this link out on rss feeds
http://weblogs.asp.net/scottgu/archive/2006/02/22/Awesome-ASP.NET-2.0-RSS-Tool_2D00_Kit-Released.aspx
|
|
|
|