|
|
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
|
|
|
|
|
Thanks for reply...
i want to get the RSS feed for the videos from the Database for the coding shoing above ,
|
|
|
|
|
How it would be possible to convert the aspx
page to a pdf document so that i can print the
form.I want all styles to be included with image
in the web page. Also the webpage contents are
mostly numerous usercontrols with scrolling applied
So i want the scroll to be removed..Means the content
inside should be obtained fully..Any body know a solution
I ve gone through so many pdf generators..like
syncfusion,expert pdf etc...
|
|
|
|
|
Member 3186365 wrote: How it would be possible to convert the aspx
page to a pdf document so that i can print the
form
Why should you convert to PDF for the sake of printing ? Create a separate page and display data without scrolling, use JS function to print the page.
|
|
|
|
|
coz my client wanted it as report
So i have to present him with
pdf report of the page..To create
report with any report tool is
impossible for my situation....
|
|
|
|
|
You can search for any PDF generation tool (pdf processing dll) in intenet that can be used to genearted pdf.
Thanks,
Arindam D Tewary
|
|
|
|
|
Am already doing that...
The Problem comes coz
i have lot of usercontrols
added dynamically to the aspx
page. So all tools are behaving
differently..Anyway i vl search
for some other solution
|
|
|
|
|
I am using one DataList in my webpage.I have given the RepeatDirection property as vertical and RepeatColumns as 2. My problem is while loading the page for the first time, some of the items displayed in the datalist is wrapped and came to next line. But in the subsequent postbacks, it appears correctly in one line. Each item is displayed along with a figure. For eg:
1. Bolt
2. Key and Key Seat
3. Nut and Bolt
While loading the page, 'Key and Key' will come in one line and 'Seat' will come in next line. Same as with 'Nut and' 'Bolt'. But this is not happening for subsequent postbacks. Any idea what's happening. Could anybody please help. I'm using ASP.Net 2.0
Thanks
Success is the good fortune that comes from aspiration, desperation, perspiration and inspiration.
|
|
|
|
|
I have a simple TreeView based menu, with two levels, top and sub, i.e. no nesting beyond sub-menu items. I use a database table for the definition, rather than an XML file and a Menu control, for a few reasons, mainly that this is already working and being demoed tomorrow; I don't want to mess with something that works.
I now need to implement an edit facility so that admin users can edit this menu. It seems to me that I could actually use the existing TreeView, putting my menu control into an edit mode, and providing commands to add or remove nodes. Is there anything I should consider before going this route? Is there maybe a better way of doing what I am?
|
|
|
|
|
Hi all..
How can i encrypt address bar when one page is redirect to another page?
ex:
http://www.codeproject.com/script/Forums/Edit.aspx?fid=12076&floc=/script/Forums/View.aspx
but i don't want to see this text in my address bar.
thanks
Sanjay Kunjam
------------------------------------------------------------------
"Computers are useless. They can only give answers" - Pablo Picasso
------------------------------------------------------------------
|
|
|
|
|
just set ADDRESSBAR=0
Anand Desai
Developer
Atharva Infotech
|
|
|
|
|
thanks.
but i am using asp.net.
How & Where i shuold set this value?
thanks
Sanjay Kunjam
------------------------------------------------------------------
"Computers are useless. They can only give answers" - Pablo Picasso
------------------------------------------------------------------
|
|
|
|
|
Replace your Response.Redirect("abc.aspx?var=something"); with following:
Page.RegisterStartupScript("searcherror","<script language="\"JavaScript\"" type="\"text/javascript\">window.open(\"abc.aspx?var=something\");</script>");
Anand Desai
Developer
Atharva Infotech
|
|
|
|
|
Replace your Response.Redirect("abc.aspx?var=something"); with following:
Page.RegisterStartupScript("anyname","window.open(\"abc.aspx?var=something\",ADDRESSBAR=0);");
Anand Desai
Developer
Atharva Infotech
|
|
|
|
|
Thanks. Anand.
Sanjay Kunjam
------------------------------------------------------------------
"Computers are useless. They can only give answers" - Pablo Picasso
------------------------------------------------------------------
|
|
|
|
|
Anytime buddy!!!
Anand Desai
Developer
Atharva Infotech
|
|
|
|
|
You can't encrypt the whole address displayed on the address bar. You can only encrypt the query string values. Look at the classes in System.Security.Cryptography[^] namespace. BTW, if the information passing is sensitive and secure, why you are passing across URL ?
|
|
|
|
|
Thanks navneeth.
i have got the sample code for Query string encryption in ASP.NET
http://www.codeproject.com/KB/web-security/QueryStringEncryptionNET.aspx[^]
Sanjay Kunjam
------------------------------------------------------------------
"Computers are useless. They can only give answers" - Pablo Picasso
------------------------------------------------------------------
|
|
|
|
|
Well, what is the reason for encrypting? First you can only encrypt query string.
What I have done is, instead of encrypting, I would hold all I need in session variable and persist that into a database, and then pass in my query string something like
www.codeproject.com?sid=GUID
The beauty of this is, one there is no encryption needed, second the user can not guess or generate random GUID and third the implementation can easily be changed with no change with the interface.
think about it.
Yusuf
|
|
|
|
|
Hi,
Actually i was thinking about that. but this is my second level of searching details.
firstly i have more than 50,000 records and all are unique.
In first query i get some details from user and display then into datagrid, they may be 1,2 or more than 5.
after adding hypeylink button in last column i have display complete details of that row item in another page.
that was bit complecated for me. so i have chosen this.
but thanks buddy.
I am now using with encrypting querystring.
Sanjay Kunjam
------------------------------------------------------------------
"Computers are useless. They can only give answers" - Pablo Picasso
------------------------------------------------------------------
|
|
|
|