|
its better to transfer the necessary data into XML and translate it using .FO.
a third party tool like ibex can develop its PDF data from the .FO file
http://www.xmlpdf.com/ibex.html[^]
Regards
Riyam Hussain
|
|
|
|
|
iam using dropdown list. The dropdown list items are assigned by datatable.now in this dropdown list some items should be hide to the user is it possible or not.
|
|
|
|
|
You should remove those items before binding with Dropdownlist. You can remove those unwanted items from either SQL query or remove from code.
|
|
|
|
|
You can remove the items which are not appropriate to display for corresponding users... while of course no need to write back to db, otherwise, you will remove them for good...
|
|
|
|
|
I display the data from database in gridview after that i click the row it will display the particular data for every 5 minutes.please give us the article
|
|
|
|
|
Where you want to display the records ?
/***********************/
Parwej Ahamad
g.parwez@gmail.com
/***********************/
|
|
|
|
|
|
Basheer wrote: for every 5 minutes
You can use Javascript timer or ASP.NET Ajax Timer control.
|
|
|
|
|
Do not use words like urgent , it is very rude and impolite around here.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Hi Everyone,
I get the error:The name 'postComment' does not exist in the current context
groups.aspx.cs doesn't see what's in the groups.aspx. I can't use the option of putting the code inside the aspx together. I would like to know how to access the textbox from the aspx.cs page
I have two pages:
groups.aspx
groups.aspx.cs
I have created a button in the groups.aspx as follows:
<asp:textbox id="postComment" runat="server">
Now I want to access it from the groups.aspx.cs to insert the contents of what was entered in the text box to the database as follows:
protected void postBtn_Click(object sender, EventArgs e)
{
SqlDataSource PostDS = new SqlDataSource();
PostDS.ConnectionString = ConfigurationManager.ConnectionStrings["ConnectionString"].ToString();
PostDS.InsertCommandType = SqlDataSourceCommandType.Text;
PostDS.InsertCommand = "INSERT INTO GroupChalkboard (Text, GroupID, UserID, CreatedDate) VALUES (@Text, @GroupID, @UserID, @CreatedDate)";
PostDS.InsertParameters.Add("Text", postComment.Text);
PostDS.InsertParameters.Add("GroupID", pid.ToString());
PostDS.InsertParameters.Add("UserID", User.Identity.Name);
PostDS.InsertParameters.Add("CreatedDate", DateTime.Now.ToString());
PostDS.Insert();
}
Thank you.
|
|
|
|
|
Albert83 wrote: I have two pages:
groups.aspx
groups.aspx.cs
Actually, those are not two pages. This is just one page and its code-behind file.
1. In Groups.aspx, the code file should be set to groups.aspx.cs.
CodeFile="groups.aspx.cs"
2. Check whether that textbox has runat="Server" or not.
|
|
|
|
|
The thing is that I have created the button and the textbox inside the Datalist, and because of that I can't access it directly. I don't know how to access it from the DataList. Here is the code:
I removed the open tags because it's not showing the code otherwise:
asp:datalist id="DataList1" runat="server" datasourceid="ChalkDL">
itemtemplate>
asp:textbox id="postComment" runat="server">
asp:button runat="server" onclick="postBtn_Click" id="postBtn" text="Post!" />
/itemtemplate>
/asp:datalist>
|
|
|
|
|
Albert83 wrote: The thing is that I have created the button and the textbox inside the Datalist, and because of that I can't access it directly. I don't know how to access it from the DataList.
There are some events called Item_DataBound or Row_Created event. In those events, you can find the control..
For example:
TextBox txt = e.FindControl("controlname");
|
|
|
|
|
I just find a possible solution but for some reason I get an error:
System.Web.UI.WebControls.TextBox PostText = (System.Web.UI.WebControls.TextBox)DataList1.FindControl("postComment");
The name 'DataList1' does not exist in the current context
The data list was declared as:
asp:datalist id="DataList1" runat="server" datasourceid="ChalkDL">
And what's weird is that I can find DataList1 as an option in the properites and methods drop list when I start typing it.
What can be the reason for it?
|
|
|
|
|
Here is the code:
protected void postBtn_Click(object sender, EventArgs e)
{
SqlDataSource PostDS = new SqlDataSource();
System.Web.UI.WebControls.TextBox PostText = (System.Web.UI.WebControls.TextBox)DataList1.FindControl("postComment");
PostDS.ConnectionString = ConfigurationManager.ConnectionStrings["ConnectionString"].ToString();
PostDS.InsertCommandType = SqlDataSourceCommandType.Text;
PostDS.InsertCommand = "INSERT INTO GroupChalkboard (Text, GroupID, UserID, CreatedDate) VALUES (@Text, @GroupID, @UserID, @CreatedDate)";
PostDS.InsertParameters.Add("Text", PostText.Text);
PostDS.InsertParameters.Add("GroupID", pid.ToString());
PostDS.InsertParameters.Add("UserID", Session["UserID"].ToString());
PostDS.InsertParameters.Add("CreatedDate", DateTime.Now.ToString());
PostDS.Insert();
}
|
|
|
|
|
Hi,
I'd 2 project one an "ASP.Net Web site" and another "Report Server Project".
Now, How can use from reports of my Report Server Project in my ASP.Net Web site?
Best wishes
|
|
|
|
|
I think that you are asking about how to use Reporting Service in ASP.NET. If we are using Reporting service, we used to have one project for reports and one project for website.
You can google about this if you want to get the sample.. ASP.NET SQL Reporting Service[^]
|
|
|
|
|
Hey all,
Just want to say I've used this site several times for help in the past and finally decided to join up and become a part of it. Before I ask my question I want you to know that I am not an experienced Web programmer. As of now I am strictly application based. I have a new, and somewhat small assignment ahead and I have an idea of how I would do it from an application side, so please let me know if this would work on the Web side as well.
The Problem -
We need a Web site that will look on our server for flash files and text files. The site will be pulling in some data from another program to let us know which videos and text files they need. On the web page it should have a link for each video avaliable in the folder. When they click on one it should take them to a page that displays the flash video as well as shows a text area with the contents of the text file that match that video.
One Solution -
Speaking of the page opening for the video to play, I thought it would be easier to use AJAX to embed the flash video in. Would this allow me to make the page more dynamic and not have so many individual pages? Or else, could I use one template page for the flash video and dynamically insert a different flash video object depending on which is clicked?
I know this may be a poor description, but it's the best I can explain in text. If anybody has any insight or thoughts on this please let me know. Thanks for reading and have a great day!
modified on Sunday, December 30, 2007 12:21:30 PM
|
|
|
|
|
ZakkFan25 wrote: The Problem
I feel like this is like a requirement.. not a problem...
ZakkFan25 wrote: thought it would be easier to use AJAX to embed the flash video in. Would this allow me to make the page more dynamic and not have so many individual pages? Or else, could I use one template page for the flash video and dynamically insert a different flash video object depending on which is clicked?
I think both ways will works. So, if you want "partial rendering", you should use Ajax and if you don't care about postback, Ajax won't be necessary..
|
|
|
|
|
Thanks for the input. I guess by "the problem" I mean the problem that I know what needs to but done but not exactly the best technique to go about doing it. Not sure how exactly I am going to list the files on the site for each file that is in the directory when I search for the files. Thanks for the reply.
|
|
|
|
|
Hi,
I want to work with some data with an ObjectDataSource. The data comes from a DB table which have two fields: ID (primary key) and Title.
I have created such a class:
[System.ComponentModel.ObjectData(true)]
class Biz
{
public Biz() {}
[System.ComponentModel.ObjectMethod(Select)]
public DataSet FetchAll() { ... }
[System.ComponentModel.ObjectMethod(Update)]
public void Update(int Serial, string Title) {...}
}
I have assigned this class to my ObjectDatasource. And I show the records with a Gridview control. Since ID field is PK it must not be update. so I make Id field Invisible or Readonly. Then when updating the records, only Title field is edditable. Afterwards, in Update method, Serial parameter is always 0 (becasue Id was not editted) and only Title field has a correct value. I need Serial field's value to update the Table because more than one person may have the same name. I have written a code in GridView's RowUpdating event and bypassed the Biz.Update method but I am quite sure it is a wrong job.
Please let me know what to do to make the ObjectDataSource update records by itself.
Thanks
Aref
|
|
|
|
|
I am having a problem updating a table field in my database. Note that I am using Visual Web Developer 2008 Express.
I am using the asp_XYZ tables for membership, etc. My table (MyTable) contains a UserId field, which comes from the aspnet_Users table. The field I wish to update is MyField and is of type 'image'
I would like to populate my WebForm/FormView with MyField and allow the user to edit/update it. I do not have a problem populating the view, but cannot figure out the UpdateCommand. BTW, my SELECT command is something like this:
SELECT MyTable.MyField
FROM MyTable
INNER JOIN aspnet_Users ON MyTable.UserId = aspnet_Users.UserId
WHERE aspnet_Users.UserName = @UserName
I cannot figure out how to update. When I use the Configure Data Source wizard, it only allows me to choose fields from one table. I thought that I would be able to specify MyTable.MyField as a field to update and aspnet_Users.UserName as a field to filter. Confusion is setting in...
Since I thought I basically knew what my eventual UPDATE command was going to be, I went ahead and typed it myself. The following is that command and its UpdateParameters.
UPDATE MyTable
SET MyField = @MyField
FROM MyTable INNER JOIN aspnet_Users ON MyTable.UserId = aspnet_Users.UserId WHERE (aspnet_Users.UserName = @UserName)
asp:Parameter Name="MyField"
asp:SessionParameter Name="UserName" SessionField="UserName"
When I used the above command/parameters, the following exception was thrown:
"System.Data.SqlClient.SqlException: Operand type clash: nvarchar is incompatible with image"
Obviously, I am no SQL expert. Can someone explain where I am going wrong? Any comments on my approach are welcome.
Thanks.
|
|
|
|
|
I think you need to define the type of parameter.
With SQL command, we used to do like that
<br />
this.sqlCommand1.Parameters.Add("@Picture",<br />
System.Data.SqlDbType.Image);<br />
this.sqlCommand1.Parameters["@Picture"].Value=this.ImageByte;
|
|
|
|
|
I installed IIS server in 2003 operating system and it is installed successfully and iam changed the port no to 90.problem is typing localhost (or) also i given my host name and port no in web browser it is not giving my 2003 o/s home page why it is not giving.
What should i do. Is this IIS installed successfully or not.
|
|
|
|
|
If you are hosting the website on Windows 2003, you need to enabled the ASP.NET script in IIS.
|
|
|
|