|
I didn't get that he wanted to view it in SQL Server across the web, but surely if SQL Server can see it, Access can ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Perhapse I misunderstood the question, but I got that he wanted to view data from the MDB in a web site. Regardless of whether it is attached via Access, or SQL Server Express, to view data from an MDB in a browser, i.e. from a web site, you would need to write a program around the MDB. Assuming I didn't completely miss the point of the question...
|
|
|
|
|
Actually, i don't want to see the data. Lets say for example you open an mdb file on your local machine and you are able to view the table structure, modify the table structure, view the data, etc.
My question is how can i give this similar functionality in the browser. The mdb is located on the server and I will build a webpage that will open the this mdb within the browser and users will be able to view the table structure, etc. They don't need to have microsoft access installed on there machine. and if they do have it this should still open in the browser.
|
|
|
|
|
So, if your need is that you need to give users the ability to edit your .mdb as if they were using Access, but on the web...then you are still left with writing a web application to provide that functionality. However, I wouldn't recommend actually sharing the .mdb directly through the web. If you choose not to host the database within SQL Server 2005, then you will have to deal with the strict limitations of the Access OLEDB (or maybe its the ODBC) provider...namely limitations with concurrent users (I think 10 is the recommended max). If you do host the mdb in SQL Server 2005, then you won't have the connection limitation, and you'll probably gain a variety of other benefits that SQL Server has to offer.
As for providing similar functionality to Access through the browser...your best bet is to check out some of the Web Control packages that many companies provide. There are some that provide Microsoft Office 2003 and 2007 like web UI components, including very interactive data grid controls (many of the ads on this site advertise such control packages). That would be the easiest and quickest (and probably the cheapest) way to provide an Access-like UI to your users through the web for editing your database. Beyond the UI...I can imagine there might be some fairly difficult challenges regarding managing concurrent usage of a single database in an Access-style UI. Generally, most web sites use databases transactionally...retrieving information, displaying one record for edit, and inserting/updating/deleting one record at a time. The Access UI allows bulk, batch (or perhapse just very rapid row-by-row) editing of data in tables, which is a whole different ball game for a web UI.
|
|
|
|
|
I've got an image control on a page that has its ImageURL property set based on a web address in a database table. Now, if the web link doesn't work, I get a box on my page with the red X. In cases like this I want to display a stock "No Photo Available" instead of the red X box. Is there a property I can set that will help me with this?
|
|
|
|
|
There's no property on the control, although there could be a property that shows text instead of the x. The place to do this is the page that returns the image. Have it return your stock image if the image selected is not in the DB.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
The control has a alternate text property. Can you use that?
I didn't get any requirements for the signature
|
|
|
|
|
Hi All
i am developing a website where i want to include a discussion forum. It will have a parent post, and a replies for the post. the replies for the post will again have a reply and this continues. Can somebody help me out with some code example.
Main Post
|________Reply
| |________Reply
|____________Reply
|_____Reply
Shouuld be able to handle this kind of situation
Regards
Naina
|
|
|
|
|
use the css margin-left property of the class you use to define the style for each thread. Then if you use a hierarchy it will work fine.
Using lists is another quick and dirty way:
- Some Thread
- Some Reply
- Some Other Reply
- Some Thread
|
|
|
|
|
Hi
Thanks a lot for the reply, i have set the style in css. but how do i dynamically use it when binding the data to the label. I couldnt understand. Could you please tell me in detail.
Thanks
Naina
|
|
|
|
|
Hi All
I have a requirement where, i created a repeater control and a link button is present in the repeater control. On clicking the link button i want to display child repeater control and bind data to it.
The child control should have the same look as the parent repeater control. It means, the child control has a link button and again on clicking the linkbutton one more child control chould be created.
The code is as below.
<
table width="100%" border="0" cellpadding="0" cellspacing="0" >
<tbody>
<tr>
<td>
<asp:Repeater ID="repeaterreply" runat="server" OnItemCommand="Repeater1_ItemCommand">
<ItemTemplate>
<table width="100%" border="0" cellpadding="0" cellspacing="0" >
<tbody>
<tr >
<td class="tdmain">
Posted On:
<asp:Label ID="lblPostedOn" CssClass="txt" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "DatePosted")%>' />
</td>
</tr>
<tr >
<td>
<table width="100%" border="0" cellpadding="1" cellspacing="1" class="tableborder1">
<tbody>
<tr class="tdrow1">
<td width="25%" valign="top">
<%
# DataBinder.Eval(Container.DataItem, "EmployeeName")%> <br /><br />
</td>
<td width="65%">
<asp:Label ID="lblrpl" CssClass="txt" runat="server" Text= '<%# DataBinder.Eval(Container.DataItem,"ArticleText") %>' /> <br />
<asp:LinkButton ID="lnkrply" runat="server" Text="View Replies" CommandName="click" CommandArgument='<%# DataBinder.Eval(Container.DataItem,"ArticleDetailID") %>' />
</td>
<td width="5%" valign="bottom">
<IMG id="img1" height="16" src="../Images/wp_up.gif" width="16" onclick="javascript:reply_show();"
onmouseover="javascript:img1.style.cursor='hand'"/>
</td>
</tr>
</tbody>
</table>
<asp:Panel ID = "literal" runat="server" />
</td>
</tr>
</tbody>
</table>
</ItemTemplate>
</asp:Repeater>
</td>
</tr>
</tbody>
</
table>
could somebody help me.....its very urgent
Regards
Naina
|
|
|
|
|
In MVC , we create a business object that represents a table fields may be with the same column names or with other names then create public properties to get and set those values .
that is totally fine until now .
then i want to display that Object in a grid , i will assign the datasource property to a ILIST,Ienumerable,IDataSource object like for example List< of One business objects > then the grid will iterate through the collection of objects getting every object and accessing the properties names that will reflect the column names in the grid , and the values of those properties will be assigned to the column values in the grid
like for example
// we have this business object
public class Customer
{
string FName;
string LName;
public string FirstName
{
get { return this.FName;}
set { this.FName = value;}
}
public string LastName
{
get { return this.LName;}
set { this.LName = value;}
}
}
now to display that class to the grid i will put it into a list for example then
the grid will iterate through the list , reading each object public properties to draw the column names
the grid will have the same column names like the public properties
then accessing these properties values to display it to the grid .
i need to make a business object to be displayed in the grid but the problem is that the business object in my task doesn't have public properties , the public properties are replaced with a data structure that reads the table schema , "Generic Business Object" that is modifiable according to the table schema inside the data base
but finally i need to display each Generic Object to the data source controls like grid
Human knowledge belongs to the world.
|
|
|
|
|
This is a cross-post from the .NET Framework forum.
|
|
|
|
|
I have a classifieds data table and a dal and a bll all writtin in vb and I have a detailsview that inserts into the database and then show the data with a gridview.everything works ok except..
the image will not show in the grid can anyone give me an example .. when my gridview shows the data the image shows a box with a red x in it
here is some of the code i have
the insert classifieds bll
<System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, True)> _
Public Sub InsertClassifieds(ByVal category As String, ByVal itemName As String, ByVal description As String, ByVal Price As Integer, ByVal EmailAddress As String, ByVal PhoneNumber As String, ByVal dateListed As Date, ByVal MIMEType As String, ByVal imageData() As Byte)
Adapter.InsertClassifieds(category, itemName, description, Price, EmailAddress, PhoneNumber, dateListed, MIMEType, imageData)
End Sub
the classifieds vb
Imports System.IO
Partial Class Classifieds
Inherits System.Web.UI.Page
Protected Sub btnCancel_Click(ByVal sender As Object, ByVal e As System.EventArgs)
'If Cancel button is clicked, send user to Default
Response.Redirect("~/Classifieds.aspx")
End Sub
Protected Sub UploadPictureUI_ItemInserting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DetailsViewInsertEventArgs) Handles UploadPictureUI.ItemInserting
'Reference the FileUpload control
Dim UploadClassifieds As FileUpload = CType(UploadPictureUI.FindControl("UploadClassifieds"), FileUpload)
'Make sure a file has been successfully uploaded
If UploadClassifieds.PostedFile Is Nothing OrElse String.IsNullOrEmpty(UploadClassifieds.PostedFile.FileName) OrElse UploadClassifieds.PostedFile.InputStream Is Nothing Then
e.Cancel = True
Exit Sub
End If
'Make sure we are dealing with a JPG or GIF file
Dim extension As String = Path.GetExtension(UploadClassifieds.PostedFile.FileName).ToLower()
Dim MIMEType As String = Nothing
Select Case extension
Case ".gif"
MIMEType = "image/gif"
Case ".jpg", ".jpeg", ".jpe"
MIMEType = "image/jpeg"
Case ".png"
MIMEType = "image/png"
Case Else
'Invalid file type uploaded
e.Cancel = True
Exit Sub
End Select
'Specify the values for the MIMEType and ImageData parameters
e.Values("MIMEType") = MIMEType
'Load FileUpload's InputStream into Byte array
Dim imageBytes(UploadClassifieds.PostedFile.InputStream.Length) As Byte
UploadClassifieds.PostedFile.InputStream.Read(imageBytes, 0, imageBytes.Length)
e.Values("ImageData") = imageBytes
End Sub
Protected Sub UploadPictureUI_ItemInserted(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DetailsViewInsertedEventArgs) Handles UploadPictureUI.ItemInserted
'If item successfully inserted, send user back to default
If e.Exception Is Nothing Then
Response.Redirect("~/Classifieds.aspx")
End If
End Sub
Private Function ValidUploadClassifieds(ByVal UploadClassifieds As FileUpload) As Boolean
' Make sure that a JPG has been uploaded
If String.Compare(System.IO.Path.GetExtension(UploadClassifieds.FileName), ".jpg", True) <> 0 AndAlso _
String.Compare(System.IO.Path.GetExtension(UploadClassifieds.FileName), ".jpeg", True) <> 0 Then
Return False
Else
Return True
End If
End Function
End Class
and the classifieds
<%@ Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="Classifieds.aspx.vb" Inherits="Classifieds" title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
Classifieds<br />
<asp:DetailsView ID="UploadPictureUI" runat="server" AutoGenerateRows="False" CellPadding="4"
DataKeyNames="PictureID" DataSourceID="insertClassifiedsDataSource" DefaultMode="Insert"
ForeColor="#333333" GridLines="None" Height="50px" Style="position: relative"
Width="125px">
<FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
<CommandRowStyle BackColor="#E2DED6" Font-Bold="True" />
<RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
<FieldHeaderStyle BackColor="#E9ECF1" Font-Bold="True" />
<PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
<Fields>
<asp:TemplateField>
<InsertItemTemplate>
<asp:FileUpload ID="UploadClassifieds" runat="server" Style="position: relative" />
</InsertItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="Category" HeaderText="Category" SortExpression="Category" />
<asp:BoundField DataField="ItemName" HeaderText="ItemName" SortExpression="ItemName" />
<asp:BoundField DataField="Description" HeaderText="Description" SortExpression="Description" />
<asp:BoundField DataField="Price" HeaderText="Price" SortExpression="Price" />
<asp:BoundField DataField="EmailAddress" HeaderText="EmailAddress" SortExpression="EmailAddress" />
<asp:BoundField DataField="PhoneNumber" HeaderText="PhoneNumber" SortExpression="PhoneNumber" />
<asp:BoundField DataField="DateListed" HeaderText="DateListed" SortExpression="DateListed" />
<asp:CommandField ShowInsertButton="True" />
</Fields>
<HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
<EditRowStyle BackColor="#999999" />
<AlternatingRowStyle BackColor="White" ForeColor="#284775" />
</asp:DetailsView>
<asp:ObjectDataSource ID="insertClassifiedsDataSource" runat="server" InsertMethod="InsertClassifieds"
SelectMethod="GetClassifieds" TypeName="ClassifiedsBLL">
<InsertParameters>
<asp:Parameter Name="category" Type="String" />
<asp:Parameter Name="itemname" Type="String" />
<asp:Parameter Name="description" Type="String" />
<asp:Parameter Name="Price" Type="Int32" />
<asp:Parameter Name="EmailAddress" Type="String" />
<asp:Parameter Name="PhoneNumber" Type="String" />
<asp:Parameter Name="dateListed" Type="DateTime" />
<asp:Parameter Name="MIMEType" Type="String" />
<asp:Parameter Name="imageData" Type=Object />
</InsertParameters>
</asp:ObjectDataSource>
<br />
<br />
<br />
<br />
<asp:GridView ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False"
CellPadding="4" DataKeyNames="PictureID" DataSourceID="ClassifiedsDataSource"
ForeColor="#333333" GridLines="None" Style="position: relative">
<RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
<Columns>
<asp:ImageField DataImageUrlField="PictureID" DataImageUrlFormatString="~/ShowPicture.aspx?PictureID={0}"
SortExpression="PictureID">
</asp:ImageField>
<asp:BoundField DataField="Category" HeaderText="Category" SortExpression="Category" />
<asp:BoundField DataField="ItemName" HeaderText="ItemName" SortExpression="ItemName" />
<asp:BoundField DataField="Description" HeaderText="Description" SortExpression="Description" />
<asp:BoundField DataField="Price" HeaderText="Price" SortExpression="Price" />
<asp:BoundField DataField="EmailAddress" HeaderText="EmailAddress" SortExpression="EmailAddress" />
<asp:BoundField DataField="PhoneNumber" HeaderText="PhoneNumber" SortExpression="PhoneNumber" />
<asp:BoundField DataField="DateListed" HeaderText="DateListed" SortExpression="DateListed" />
</Columns>
<FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
<SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
<HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
<EditRowStyle BackColor="#999999" />
<AlternatingRowStyle BackColor="White" ForeColor="#284775" />
</asp:GridView>
<asp:ObjectDataSource ID="ClassifiedsDataSource" runat="server"
SelectMethod="GetClassifieds" TypeName="ClassifiedsBLL"></asp:ObjectDataSource>
<br />
</asp:Content>
i hope someone can help me
|
|
|
|
|
You have a history of giving meaningless titles to your questions.
Please use the code tags. Most of us ignore looking at your question if you can't follow the basic guidelines.
|
|
|
|
|
hello friends,
In my application i am having a usercontrol py_user, now i want to create its multiple instance at runtime, like if i enter 5, 5 py_use control should be added on the page.
Please help me how to do this.
|
|
|
|
|
What I think you're asking for is creating your py_user control dynamically, when certain conditions are met, and also, a specified number of times, which would be user-input defined.
I'm only guessing you'll be putting that number in a textbox somewhere on your page.
Either way, how you should be doing it, is:
private void CreatePyUser()
{
try
{
int pyNum = Convert.ToInt32(textBox1.Text);
for(int py_uNum=0; py_uNum<=pyNum; pu_uNum++)
{
py_user py_user1 = new py_user();
py_user1.ID = "py_user"+py_uNum.ToString();
this.Controls.Add(py_user1);
}
}
catch
{
Response.Write("Please put in a number in the given textbox.");
}
}
If that's not what you wanted, please try explaining what you need in a bit more detail.
And perhaps pass some of your own code, sometimes?
var question = (_2b || !(_2b));
|
|
|
|
|
Thanks for your quick reply but i am not able to make an object of the usercontrol ie py_user py_user1 = new py_user();
also this part i have done using
Control t = LoadControl("../UserControl/py_user.ascx");
t.ID = "py" + i.ToString();
pPanel1.Controls.Add(t);
In my user control there is a textbox that takes an integer value and generates a table with the specified no of rows,
Now what happens suppose i have created 3 instance of my usercontrol, again in the first usercontrol i want 3 rows so i put 3 and generate 3 rows till this it is working fine, but when i move to second instance of usercontrol and try to generate 2 rows it generate 2 rows but it clear the rows of first control.
i want rows in all the usercontrols, please help me..............
|
|
|
|
|
I think I know what you mean...
As I understand it, you have something like this, in the code-behind of your usercontrol:
private void CreateTable(int x)
{
HtmlTable table = new HtmlTable();
for (int y = 0; y <= x; y++)
{
HtmlTableRow tableRow = new HtmlTableRow();
table.Controls.Add(tableRow);
}
this.Controls.Add(table);
}
And this method gets called through some button click on the user control.
This is only going to govern this instance of your py_user. It will do a postback and render a table FOR THIS instance. But the remaining 4, or however many py_user controls on that page will not have had that buttonclick triggered for them and therefore they would get rendered as PURE py_user controls (no tables, no rows), if at all.
I don't like your design one bit.
Sorry there is no easy way out, without adding those controls to the Session, then checking if the session is not null.
Honestly, what are you trying to achieve through this?
var question = (_2b || !(_2b));
|
|
|
|
|
I am having two DetailsView both are in update panel,and the objective of 1stDetails view is to Add Category and the 2nd is to Add subcategory.I have used a Dropdown list to select Category in 2ndDatalist.But Failed to Rebind the dropdown list Afetr immediate Category addition. I have alredy used Updatemode=Conditional,and ScriptManager.GetCurrent(Me).RegisterPostBackControl(datalistName) as i have to Upload image for both category and SubCatecory.
Any type of help is appreciated.Thanks
|
|
|
|
|
We are designing an application in which a large number of forms with predefiend text have to be presented to the user and the user has to fill in the desired values and post it back to the application. The following 2 solutions are there in my mind :
1. We could have used directly pdf in browser and get the user entered data posted back to the application for processing.
2. Adobe Forms Server (but the S/W is not with me so can't decide on it)
The primary requirements are :
1. The user should be presented with the form in the way he should be able to print it.
2. We need to have control on whether the user can save/print the form or he cannot do so.
3. There may be a need for the form to be presented back to the user at a later stage, with the data filled in by him through an application generated ID.
Thanks,
Sundeep
|
|
|
|
|
Sundeep Moudgil wrote: We are designing an application in which a large number of forms with predefiend text have to be presented to the user and the user has to fill in the desired values and post it back to the application. The following 2 solutions are there in my mind :
1. We could have used directly pdf in browser and get the user entered data posted back to the application for processing.
2. Adobe Forms Server (but the S/W is not with me so can't decide on it)
The primary requirements are :
1. The user should be presented with the form in the way he should be able to print it.
2. We need to have control on whether the user can save/print the form or he cannot do so.
3. There may be a need for the form to be presented back to the user at a later stage, with the data filled in by him through an application generated ID.
Thanks,
Sundeep
I'm sorry. Is there a question in there?
As much as it pains me to say this, have you tried InfoPath?
I didn't get any requirements for the signature
|
|
|
|
|
Thanks for your reply.
My question is what would be the best approach in such a scenario?
I am aware of only these 2 options mentioned by me :
1. We could have used directly pdf in browser and get the user entered data posted back to the application for processing.
2. Adobe Forms Server (but the S/W is not with me so can't decide on it)
In the first one I am not aware of how I can control the toolbars display for achieving the flexibility to programatically decide is the save / print options are to be encabled or not.
As for the second one, I have formed my understanding on the basis of whatever I have read, but have never used it and since I don't have this S/W so can't clearly decide if that will be the recommended solution.
Of these 2 approaches is there a better approach also?
Also for option 1 , how can I achieve the flexibity that is required ?
I have not used InfoPath..
|
|
|
|
|
Hello all,
I am searching for control which control is more faster to display data from database.
currently I am using repeater control and data grid view.
and some time I get data with help SqlCommand and Sql addapter I though it is more fast.
If I create a custom control and use response.Write it will fast?
If you have any suggestion than please share with me.
Regards
|
|
|
|
|
Data Adapters are slow, databinding is slow, data binding using DataBinder.Eval is really slow.
Get the data via a Data Reader, stuff it into a custom object, and then render the page using a repeater control without using DataBinder.Eval and I think you will notice a fair, maintainable improvement.
Also, how much data are you trying to display? Retrieve the smallest amount possible for the given screen and rendering only the required elements is another avenue for speed improvements.
|
|
|
|
|