|
sir,
How to register custom dll into report.rdlc(report viewer)?
and how to custom function in to report.rdlc ?
plz send me reply
Thanks & Regards
Lav Naphade
lav naphade
|
|
|
|
|
lav naphade wrote: How to register custom dll into report.rdlc(report viewer)?
and how to custom function in to report.rdlc ?
Answers to these questions can be found by reading the Reporting Services documentation[^].
BTW, this question has nothing to do with ASP.NET. The ReportViewer component only provides a means of presenting a report. All logic is contained in the report definition which is stored on the Report Server. Reporting Services questions should be asked in the SQL forum.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
hi all,
i use following code for accessing the data from an access file:
public partial class _Default : System.Web.UI.Page<br />
{<br />
OleDbConnection connect = new OleDbConnection();<br />
OleDbDataAdapter dbadapter = new OleDbDataAdapter();<br />
OleDbCommandBuilder dbbuilder = new OleDbCommandBuilder();<br />
DataTable dbtable = new DataTable();<br />
int cntr=0;<br />
-------------<br />
protected void Page_Load(object sender, EventArgs e)<br />
{<br />
if (!IsPostBack)<br />
{<br />
ViewState["row"] = 0;<br />
}<br />
connect.ConnectionString =<br />
@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\temp\xtreme.mdb";<br />
connect.Open();<br />
<br />
<br />
}<br />
-------------<br />
protected void Button3_Click(object sender, EventArgs e)<br />
{<br />
cntr=(int)ViewState["row"];<br />
dbadapter = new OleDbDataAdapter("select * from employee", connect);<br />
dbadapter.Fill(dbtable);<br />
if (cntr < 15 && cntr>=0)<br />
{<br />
cntr++;<br />
Label5.Text = "" + (cntr+1) + ". " + dbtable.Rows[cntr]["First Name"].ToString()+ " " + dbtable.Rows[cntr]["Last name"].ToString();<br />
ViewState["row"] = cntr;<br />
}<br />
}
but i dont know that how i can get the bmp image from this access file..........
i try as:
Image1.ImageUrl = "" + dbtable.Rows[cntr]["Photo"].ToString();
but fail.......
|
|
|
|
|
Hi,
I am using a master page with all my normal .aspx files. How do I dynamically add javascript files to the head part of each .aspx page seeing that not all pages will use javascript?
What I mean is how would I add the following dynamically:
<script type="text/javascript" src="myjs.js"></script>
I use HtmlLink and HtmlMeta to set the link and meta tags dynamically, but how do I dynamically add script tags? I thought that there would be something like HtmlScript?
Thanks
Brendan
<div class="ForumMod">modified on Saturday, March 29, 2008 1:47 PM</div>
|
|
|
|
|
Use the RegisterClientScriptResource[^] method of the Page.ClientScript object to inject a script reference. Do this in your Master page.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
HtmlTextWriter class is used to render the HTML to browser. This class is used to write the elements, attributes for different types of markup. Try using the below code(overide the render method of the page) to write the SCRIPT element to the page. Hope it works.
Protected Overrides Sub Render(ByVal writer As HtmlTextWriter)
writer.AddAttribute("type", "text/javascript")
writer.AddAttribute("src", "myjs.js")
writer.RenderBeginTag(HtmlTextWriterTag.Script)
MyBase.Render(writer)
writer.RenderEndTag()
End Sub
- Regards - J O N
A good thing is a bad thing if it keeps you from the best thing. - Dr. Adrian Rogers
|
|
|
|
|
Hi,
Question:
Case 1: There are many C# client applications (eaxctly one C# windows application running on exactly one client machine, so cumulatively it many many client applcations) and one asp.net web server..
All these clients interact with web server independently..
Case 2: Same as case 1, many client applications, one web server but one difference.. There is a web service in between..
Which case has the best architecture and why???
|
|
|
|
|
Hi,
I have master page Website.master, and a Default.aspx that uses this master page. I will need to set the meta tags of each page dynamically. This was how I normally do it, but for some or other reason it does not work now:
Website.master.cs
public HtmlHead PageHeader
{
get { return (HtmlHead)Page.Header; }
}
public string MetaKeywords
{
set
{
HtmlMeta keywords = new HtmlMeta();
keywords.Name = "keywords";
keywords.Content = value;
PageHeader.Controls.AddAt(2, keywords);
}
}
Default.aspx.cs
Master.MetaDescription = "TEST";
The error that I keep on getting is:
The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).
I have no idea what I am doing wrong here??
Thanks
Brendan
|
|
|
|
|
hi
How the availability of name is checked so much fast ?
I was registering into a website so with in no time it gave me a reply that name is available/not available ..
According to me ...Ajax played the role hear but how ?
thank you
Dont Get Paid for the Hours you worked, Get Paid for the Work You Have Done in an Hour.
|
|
|
|
|
Hi,
have a look at this control of asp.net ajax control toolkit. it may give you some idea how this thing can happen. http://www.asp.net/AJAX/AjaxControlToolkit/Samples/AutoComplete/AutoComplete.aspx
Faraz Shah Khan
MCP, MCAD.Net
Blog
|
|
|
|
|
Linkety[^]
Brad
Australian
The PHP MVP
- Christian Graus on "Best books for VBscript"
A big thick one, so you can whack yourself on the head with it.
|
|
|
|
|
hi everyone,
I'm working on a making a Spanish translated version of a website and I need to generate Spanish alphabets in place of English alphabets which are being generated like this. Basically what I wanna know is the STARTING VALUE OF THE FIRST SPANISH ALPHABET IN UTF32.
Thanks in advance
protected void GenerateAlphabetPagingFields()<br />
{<br />
TableCell cell = new TableCell();<br />
AlphabetPagingTable.Rows[0].Cells.Clear();<br />
cell.ColumnSpan = 2;<br />
treeviewDIV.Visible = true;<br />
Table tab = AlphabetPagingTable;
if (tab != null)<br />
{<br />
for (int i = 65; i <= (65 + 25); i++)<br />
{<br />
<br />
<br />
LinkButton lb = new LinkButton();<br />
<br />
lb.Text = Char.ConvertFromUtf32(i) + " ";<br />
<br />
lb.CommandArgument = Char.ConvertFromUtf32(i);<br />
<br />
lb.CommandName = "AlphaPaging";<br />
lb.Click += new EventHandler(AlphabetPagingLink_Click);<br />
cell.Controls.Add(lb);<br />
tab.Rows[0].Cells.Add(cell);<br />
Label lbl = new Label();<br />
lbl.Text = " ";<br />
<br />
lbl.Font.Underline = false;<br />
TableCell td = new TableCell();<br />
td.Controls.Add(lbl);<br />
<br />
tab.Rows[0].Cells.Add(td);<br />
<br />
}<br />
<br />
}<br />
<br />
}<br />
Rocky
Success is a ladder which you can't climb with your hands in your pockets.
|
|
|
|
|
Can anybody tell me how to Custom Paging in GridView
......
|
|
|
|
|
plz refer to 4GuysFromRolla.com
you will find a very nice article on this.
Rocky
Success is a ladder which you can't climb with your hands in your pockets.
|
|
|
|
|
Hi!
How can I open a gridview in edit mode?
Normally if you open a website the gridview isn’t in edit mode. You can edit a row in gridview by clicking on edit button (edit link).
What I want is to open a website (with a grid) and all of the rows are in edit mode. You can edit a column and click on refresh or save.
Thanks in advance!
Best regards
Klaus
|
|
|
|
|
hi Klaus!
I think if you're using TemplateFields in GridView then you can put all the rows by default in edit mode. Actually there is a property called EditIndex. when you set it to a certain row number it changes itself to the edit template. so this is related to a single row you know. Since you want all the rows to be in edit mode. you need to craft this yourself by adding the text boxes etc
I hope it helps you
Thanks
Rocky
Success is a ladder which you can't climb with your hands in your pockets.
|
|
|
|
|
How can I do that? Can you make me an example please?
Tanks in advance!
Best regards
Klaus
|
|
|
|
|
It goes something like this...
Thats only to show the use of Template Fields. You should carry on according to ur req from here
<asp:gridview id="GridView1" autogeneratecolumns="False" runat="server" datasourceid="ObjectDataSource1" horizontalalign="Left" width="205px">
BorderWidth="0px" CellPadding="0" >
<columns>
<asp:templatefield headertext="Refine Search">
<headertemplate>xyz
</headertemplate>
<itemtemplate>
<asp:textbox id="tb1" runat="server" Text='#Eval("DbField")'>
</asp:textbox></itemtemplate>
<footertemplate>
</footertemplate>
</asp:templatefield>
</columns>
</asp:gridview>
Hope that helps
Thanks
Rocky
Success is a ladder which you can't climb with your hands in your pockets.
|
|
|
|
|
Hi,
You can try
//Index of the row to be edited.
GridView1.EditIndex = 0
GridView1.DataBind()
Faraz Shah Khan
MCP, MCAD.Net
Blog
|
|
|
|
|
stupid question:
how can I use it in my grid?
Thanks in advance!
Best regards
Klaus
|
|
|
|
|
hi,
well u can use it like this
on form's load event ...
if you are using C#.net
if (!IsPostBack)
{
GridView1.EditIndex = 0;//assuming that you want to show first row editable
GridView1.DataSource = "Your DataSource";
GridView1.DataBind();
}
Faraz Shah Khan
MCP, MCAD.Net
Blog
|
|
|
|
|
If I use your code, I get an error message, can you tell me why?
Here is my code:
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
GridView1.EditIndex = 0;
GridView1.DataSource = "SqlDataSource1";
GridView1.DataBind();
}
}
}
Here is the error message:
System.InvalidOperationException was unhandled by user code
Message="for GridView1 are DataSource and DataSourceID defined. Delete one of them (is translated by me German = English)”
Source="System.Web"
StackTrace:
bei System.Web.UI.WebControls.DataBoundControl.ConnectToDataSourceView()
bei System.Web.UI.WebControls.DataBoundControl.GetData()
bei System.Web.UI.WebControls.DataBoundControl.PerformSelect()
bei System.Web.UI.WebControls.BaseDataBoundControl.DataBind()
bei System.Web.UI.WebControls.GridView.DataBind()
bei _Default.Page_Load(Object sender, EventArgs e) in
....
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)
bei System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
bei System.Web.UI.Control.OnLoad(EventArgs e)
bei System.Web.UI.Control.LoadRecursive()
bei System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
InnerException:
Thanks!
Best regards
Klaus
|
|
|
|
|
Hi,
As you have already defined DataSourceID and DataSource try your code like this
GridView1.EditIndex = 0;
GridView1.DataBind();
The error is generated probably because when you have already assinged DataSource and DataSourceID in designer and try to assign DataSource again in code it gives error.
Faraz Shah Khan
MCP, MCAD.Net
Blog
|
|
|
|
|
Datagrid with checkbox using asp.net.so i will select checkbox and the show to datagird datas show in lable,datagrid using paging concept,I need select checkbox in page 1 some datas and then select page 2 in some datas.but i can't any one only.Any body know,tell immediately...and thanks.........
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim ldstdateset As New DataSet
Dim lobjdatatier As New TicDataTier
ldstdateset = lobjdatatier.ExecStoredProc("TIC_GET_tTic_MM_Modules", lstrparameter, "Gmdataset")
Me.MyDataGrid1.DataSource = ldstdateset.Tables(0)
Me.MyDataGrid1.DataBind()
End Sub
Private Sub MyDataGrid1_PageIndexChanged(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridPageChangedEventArgs) Handles MyDataGrid1.PageIndexChanged
Me.MyDataGrid1.CurrentPageIndex = e.NewPageIndex
Me.MyDataGrid1.DataBind()
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim i As Integer = 0
Dim mySelection As StringBuilder = New StringBuilder
mySelection.Append("Selected Row(s):<hr><br>")
Dim GridItem As DataGridItem
For Each GridItem In MyDataGrid1.Items
Dim myCheckbox As CheckBox = CType(GridItem.Cells(0).Controls(1), CheckBox)
If myCheckbox.Checked = True Then
i = i + 1
mySelection.AppendFormat("{0}<br>", GridItem.Cells(1).Text)
' mySelection.Append("<hr>")
mySelection.AppendFormat("{0}<br>", GridItem.Cells(2).Text)
End If
Next
mySelection.Append("<br>")
mySelection.Append("<hr>")
mySelection.AppendFormat("Total selected Value is: {0}<br>", i.ToString())
Me.Label1.Text = mySelection.ToString.Trim()
End Sub
Private Sub MyDataGrid1_PageIndexChanged(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridPageChangedEventArgs) Handles MyDataGrid1.PageIndexChanged
Me.MyDataGrid1.CurrentPageIndex = e.NewPageIndex
Me.MyDataGrid1.DataBind()
End Sub
And once again thanks
regards,
sen.V
|
|
|
|
|
Hi,
what i believe you will be required to create a method that will check the selected rows of the grid view. when the page is changing call that method and store the selected row in a session. on the next page when user select rows repeat the same process. note that the method will not only be called no the page index change but also where there is some post back on the page.
hope it will help.
Faraz Shah Khan
MCP, MCAD.Net
Blog
|
|
|
|