I have been trying to do this for some time with no luck...
The user registers an item into our database and is then presented with the just inserted details. This item requires a couple of labels, a CD Face label, a CD Inlay label and a barcode label for the packaging. Previously this was done by word templates which had a form on opening to gather the info. Each item then (in theory) requires the user to put in some basic facts 4 times if you include the original registration.
The issue I have is with internet explorer I guess, or the presentation of the data... For instance our barcode printer uses labels which are 5cm x 7cm. Anything remotely larger will not print correctly. So I make a formview with everything set out as 4cm x 6cm and set the page setup to 4.5 x 6.5. it then printed across 4 labels. This is quite frustrating as the print has to be consistent and is reliant upon the user setting quite a few items before trying to print!
So my next excursion was with Word. Create an Interop.Office based way of filling fields in on a template that I knew printed everytime bang on. After the faf of CSID issues and permissions to launch applications, I found that it would work if I was running it using the ASP.net test environment, but on the server it just spawned winword.exe over and over !!!!!!!
The ideal way for me would be that a formview is printable, the ideal way for the user is using word but automate the items being filled in, however I can't seem to get either to work correctly!
I have a page with a datalist on it. The datalist shows numerous rows with various data in each column, each showin in a textbox. I'd like the user to be able to select or not select each row (displayed in datalist), and then to click a button which would place all of the data in selected rows into one big label so that it can be printed or emailed.
I am using the following code to decode base 64 and quoted printable encoded messages. It works well for all the charset's except for quoted printable chinese (Charsets: GB18030, GB2312). When I tried to decode, I am getting '?' as output. provide on this code or any other code that decodes all types of encoded string?
I have been presented with numerous word and excel docs. The goal is to put them online and bind to a database for the fields and also to store data for easy searching and reporting.
Has anyone done anything like this before?
I know the easy solution would be to create a database table for each particula form and also an ASP.net page for each form.
But then there are problems like printing and correct formating so it fits on the page, spaning multiple pages and so on.
And also is there any advice on how to write to PDF straight from the page?
I want to make a grid that the users will print and that will display it's rows in different colors on the printable versionI'm using ASPXIt seems that even you make the colors right, when you print it , the colors are disapearing
I've created a website in Visual Studio 2008 with a database and want to create a series search options that someone could use to search for specific things in the database. I've so far got one search parameter sucessfully working but I'm failing to figure out how to have multiple search options. How it works at the moment is there is a gridview linked to a SqlDataSource which is set up to work with a list box. The list box is linked to one column in the table. Each time someone picks a option from the list box it refreshes the page and returns the items with the the option selected in the gridview.
I hope the above makes sense. Now what I want to do is add further list boxes and text boxes offering a series of search options linked to a search button that then refreshes the page and returns the results to the GridView. How would I go about doing this? I'm relatively new to Visual Studio and still learning.
I have an accessdatasource with multiple columns, one column I use it to populate a dropdownlist. Can I use the data from other columns to insert into a table, insert being done in the aspx.vb page, without creating gridview etc.
Is it possible to make a detailsview one column visible= false and still be able to evaluate its contents?
I am in need of getting the correct sysntax for being able to use paging with a datalist whose data is being generated by a SQL Datasource and a stored procedure inside the aspx(asp.net VB...Not C#) page. A Gridview or any other rigid control that does not allow full control and layout will not work so I have to use the datalist. I have the datalist working perfectly but I need to add paging. I did some searching and found a good solution. It was a C# solution, in particular the code behind syntax so I used a code converter to convert it to VB. However, as I am not an experienced coder I need help converting the portion for handling the datalist. I am fairly confident I have the buttons on the aspx page worked out. I will ask that if you se something I need to do besides the section(5) I have listed please offer suggestions. So that you can help me better I have boken the code out into sections where I'm listing the code I copied, my code and the section I need help with. I think at a minimum I will have to change the references of Repeater to Datalist.
The section I need help with is section 5 where the original autor is referencing items generated in the Repeater where he used XML. As I said I'm using a SQL Datasource with a Datalist so I truly don't understand what I need to change to get the code behind to work with my Datalist. As always I appreciate all of you guys and ladies help. And also as always I will ask to please provide the actual code to type in because telling me how to do it just won't help very much. Sorry about that.
Here is what I have: SECTION 1 - The buttons to handle the paging ******************************************* <td> <asp:label id="lblCurrentPage" runat="server"></asp:label></td> </tr> <tr> <td> <asp:button id="cmdPrev" runat="server" text=" << " onclick="cmdPrev_Click"></asp:button> <asp:button id="cmdNext" runat="server" text=" >> " onclick="cmdNext_Click"></asp:button></td> </tr> ********************************************
SECTION 4 - Public Property CurrentPage() As Integer Get ' look for current page in ViewState Dim o As Object = Me.ViewState("_CurrentPage") If o Is Nothing Then Return 0 Else ' default to showing the first page Return CInt(o) End If End Get Set Me.ViewState("_CurrentPage") = value End Set End Property Private Sub Page_Load(sender As Object, e As System.EventArgs) ' Call the ItemsGet method to populate control, ' passing in the sample data. ItemsGet() End Sub
SECTION 5 - NEED HELPING IN CHANGING TO WORK WITH DATA LIST *************************************************** Private Sub ItemsGet() ' Read sample item info from XML document into a DataSet Dim Items As New DataSet() Items.ReadXml(MapPath("Items.xml")) ' Populate the repeater control with the Items DataSet Dim objPds As New PagedDataSource() objPds.DataSource = Items.Tables(0).DefaultView objPds.AllowPaging = True objPds.PageSize = 3 objPds.CurrentPageIndex = CurrentPage lblCurrentPage.Text = "Page: " & (CurrentPage + 1).ToString() & " of " & objPds.PageCount.ToString() ' Disable Prev or Next buttons if necessary cmdPrev.Enabled = Not objPds.IsFirstPage cmdNext.Enabled = Not objPds.IsLastPage repeaterItems.DataSource = objPds repeaterItems.DataBind() End Sub
Private Sub cmdPrev_Click(sender As Object, e As System.EventArgs) ' Set viewstate variable to the previous page CurrentPage -= 1 ' Reload control ItemsGet() End Sub
Private Sub cmdNext_Click(sender As Object, e As System.EventArgs) ' Set viewstate variable to the next page CurrentPage += 1 ' Reload control ItemsGet() End Sub
I'm a bit of an ASP.NET newbie and I am creating a data table in memory and binding this to a gridview control. The code is as follows:
Dim DstBasket As New DataSet, TblBasket As New DataTable With TblBasket .Columns.Add("BskPrdCd", System.Type.GetType("System.String")) .Columns.Add("BskPrdDesc", System.Type.GetType("System.String")) .Columns.Add("BskQty", System.Type.GetType("System.Int16")) .LoadDataRow(Split("12345,Test product 1,1", ","), True) .LoadDataRow(Split("122,Test product 2,2", ","), True) .LoadDataRow(Split("123A,Test product 3,5", ","), True) .LoadDataRow(Split("44,Test product 4,1", ","), True) End With DstBasket.Tables.Add(TblBasket) With LfnGridView("GdvBasket") .DataSource = DstBasket .DataBind() End With
The data displays in the gridview control fine with both edit & delete options but when I attempt to delete, it has no effect. How do I force removal of the relevant row from both gridview and table? Most of the documentation I have unearthed shows how to achieve this when connected to a SQL table which is clearly not the case here.
can i declare and define a datacolumn alltogether at runtime?? I need to add a column(this column is supposed to be displayed at last in gridview) containing a control(which control should i use? :P) which i would use for redirecting to a different page and it will display data related to that particular column in a gridview.
For eg: last column in gridview1 on page 1 will have text "details" after clicking it an event will be fired which will fetch details of that particular row from database. My major problem is to ctreate this last column with some event firing thing in it :-)
I have a grid that displays all the years sales cost and billing margin (1-(cost/sales)) but it seems on some years there is a cost but no sale and it is giving me a cannot divide by 0 error on running. how can i make it where if it cannot give the BM then it will say N/A or something instead of erroring out?
I have to create in a asp.net, a document with header fields and a grid with the details.Everything must be save at the end with the button Save.I thinking using a gridview to deal whit the details, bu I dont know how to make a gridview disconnect from my database.Maybe using a Dataset, make the updates to gridview and in the END save all to the database?
I am trying to use a repeater control that will display a hyperlink control. For the text of that Hyperlink control I would like to concatenate to fields from my data source (lets say First Name and Last Name). How would I do this appropriately for the Hyperlink control within an ItemTemplate?
I have a stored procedure that creates a global temporary table. I fill in five records with nulls into the temp table. I select * from my global temp table. (I can replicate this in sql and see my table from the select * command) In ASP.net; I create a gridview that binds to the stored procedure as the select.command. I run my webform
The idea would be then to figure out how to edit the nulls and then append the data from my temp table on the actual table. I see nothing. No error. No grid. Nothing. Just plain white! What am I not doing right? Or what am I doing wrong?
I have a need to create controls such as textbox, dropdown, etc in code (c#). The number and data for them is all contained in a database.
What is the best way for me to create and add these to the page (need to be underneath the next one as in a table layout) and then how do I refer back to these in code on postback?
My code is below. I can add messages for row deleted and row updated fine, but the e.exception doesn't exist for row-created. My add-row 'success' message doesn't work properly because it doesn't allow the other messages to then overwrite the label.text for some reason.
I created a database with ID, Title, Content, Date, ImgLnks, Image and Imagecaption and i'm using ObjectDataSource to populate the data. The field "ImgLnks" displays a new blank window with URL. This column is entered as text, inserted into the database and displays as clickable link in the gridview. My question is, is there a way that I can put an Alternative Standard Text in this column instead of displaying the clickable link like [URL] etc.? Text like, "Visit Page".