|
Hi there,
I have no idea about a web site where you see the examples, but you can look into the Web Service/Remoting to implement the 3 physical tiers.
|
|
|
|
|
Using Visual Web Developer 2005 and VB, I have created a web form page with a datagrid that shows the data which is stored in an SQL database Table. Everything shows perfectly but it requires the data to already be in the database. Right now, I am exporting the data as a csv file (our only choice to export from our POS system), clearing the data out of the table in the database, and manually importing the csv file. What I would like is to have an Upload procedure that will automatically clear the table and input the new data into that same table without any extra measures by the user.
I created a FileUpload procedure (FileUpload1) which allows the user to browse to the file they want. I have set up a string that holds the location of that file (fi as string). I also have a Import button (btnImport) which is where I need to write the code which will take the csv file in the above location (fi) and save it to the database table I have set up. I basically want to be able to skip having to go to the SQL Server Manager and import teh csv into the table whenever they need it.
Any help would be GREATLY appreciated.
-- modified at 17:00 Thursday 4th May, 2006
|
|
|
|
|
After you have the uploaded csv file, you can use the ADO.NET to read the file data, then insert into the SQL database. If you use the search functionality of the site, you will get some results[^].
|
|
|
|
|
I couldn't actually find anything that will help with what I am trying to do (I did try to search first). What few articles I found were in C and I need them in VB (actually in vb for use in Visual Web Developer). I just find it funny that they have created an interface that make it so easy to view a table and edit all it's properties (like which columns to import, what there names should be, etc) yet either saving that table as csv or uploaded to that table seems to be such a problem.
|
|
|
|
|
I am new to developing asp.net files in Dreamweaver. I created my dataAccess classes in Visual Studio and would now like to put the into Dreamweaver. Could someone help me with how I should do this? i.e. like do I just grab all the files from VS (bin, web, global, etc...) and put them into my website directory in Dreamweaver?
Thanks for the help
|
|
|
|
|
Hi,
I am trying to append form data into excel spreadsheet, I tried looking all over for this but unable to do. Was able to append to text file but now trying to an excel spreadsheet. Any help is appreciated.
Thanks.
Vani
|
|
|
|
|
There are a couple of options that you may try:
+ Use a third party component for example Aspose.Cells to support working with Excel.
+ Use the Automation (not recommeded though it works).
+ Use the ADO.NET[^] to read/insert/update data in the excel sheet.
|
|
|
|
|
Hello,
I am playing with ways to set query command in VB.NET to retrieve set of records from SQL DB. I know basic sytanx and it works well.
However I can not get this to work.
I have a textbox where users enters a name of broker and then when clicks Search button, data grid gets populated with all broker info. This works well if name that user entered exists in SQL DB.
My goal was to have this same result, but when users enters partial name too.
Example: Full broker name: Mike Tyson
Partial broker name: Mi
This is the string I used but it does not work:
Dim strSQL As String = "SELECT * FROM broker
where name like '" & strName& "%'"
This returns error : Index was outside the bounds of the array.
If I enter this command directly in SQL Analyzer as
SELECT * FROM broker where name like 'Mi%' it works just fine.
What I am missing???
|
|
|
|
|
MontenegroATL wrote: Dim strSQL As String = "SELECT * FROM broker
where name like '" & strName& "%'"
Don't let Colin[^] see this code.
|
|
|
|
|
Hi,
How we can detect browser-close (x) event in asp.net?
Anybody has some idea .please let me know
Regards
Rajesh
|
|
|
|
|
There's no good way to detect the close button of the browser, but there are some events of the window object like onbeforeload,onload which are close to what you want.
|
|
|
|
|
Anybody know of any good free ASP hosts out there? (Besides Brinkster)
Don't need a lot of storage, just something stable to test on.
Isaac Sasson
"I hate it. Java sucks. And Java's generics suck harder. And in general, Java just sucks."
- David Stone, The Lounge (May 1st 2006)
|
|
|
|
|
Hi David,
I had hosted my asp site last year in domaindlx.com. I've heared, somebody else has purchased the site so I don't no whether they are still in free hosting or not. Anyway, ASPSpider.net is still providing free space without any banner.
for asp - domaindlx.com
for asp.net (2003) www.aspspider.net
says Neeraj.
Neeraj
|
|
|
|
|
Thanks a lot!
And by the way I'm Isaac not David
Isaac Sasson
"I hate it. Java sucks. And Java's generics suck harder. And in general, Java just sucks."
- David Stone, The Lounge (May 1st 2006)
|
|
|
|
|
as a newbie, I have developed a simple administrative app that lists members of our mailing list. ON the viewing page, checkboxes are dynamically listed along with the member info. When one checks a box and clicks 'edit', i want the item checked to open into the edit page with it's appropriate data. Problem: I can get the checkbox associated to an id number on the viewing page. I just can't seem to figure out how to send that id and data to the edit page. any help or suggestions would be great. can provide code examples if needed.
karinb
karinb
|
|
|
|
|
in the querystring if it's just simple data...
|
|
|
|
|
From viewing page you can use code similar to this
Dim trans_id As Integer
Dim dgrCode As Label = E.Item.FindControl("lblCode")
trans_id = CType(dgrCode.Text, Integer)
Server.Transfer("EditList.aspx?&trans_id=" + trans_id.ToString(), True)
which does this: reads value from control named lblCode.
Since I needed to transfer this value to next page as integer, I casted it.
Last line of code redirects user to "edit list" page along with value from the control
In Edit List page under Page Load or somwhere else have line similar to this.
lblTest.Text = Request.Params.Get("trans_id")
What this does: it reads a parameter sent from viewing page and assign its value to text box.
I hope this gives you the general idea
Srdjan
|
|
|
|
|
I truly appreciate your solution, just wish i could figure out how to implement it. i should have mentioned i'm developing in c#. Here's what I've tried to do with your sample:
--this is in my Page_Load---
--creates an instance of a checkbox and dynamically populates inline with the list of users and sets its value to the same as the pk of the associated dataset---
CheckBox cboCheck = new CheckBox();
cboCheck.AutoPostBack = false;
cboCheck.ID = dsUserInfo.Tables[0].Rows[intCtr]["intMailIDpk"].ToString();
---Event Handler
public void btnEdit_Click(object sender,System.EventArgs e)
{
--->getting error message at this line: Object reference not set to an instance of an object.--
Int16 ckID = Convert.ToInt16(cboCheck.ID);
cboCheck.ID = Convert.ToString(cboCheck.FindControl("ckID"));
Server.Transfer("addedit.aspx?&ckID=" + ckID.ToString(), false);--probably need to user Response.Redirect here, you think??--
}
any help is greatly appreciated. i'm sure i'm just one line of code off here, and then my app works great.
karinb
-- modified at 15:11 Tuesday 9th May, 2006
|
|
|
|
|
You will find lots of useful .Net material in this site
Visit this site
http://www.dotnetguide.co.nr
|
|
|
|
|
dotnetguide wrote: Visit this site
I will certainly not.
---
b { font-weight: normal; }
|
|
|
|
|
Iam using livecontrols, but a sometimes the browser put this message..
The server viewstate cache has timed out..
|
|
|
|
|
I have the following DataList
<div style="overflow:scroll;">
<asp:DataList ID="dlAvatar" runat="server" DataKeyField="FileName" RepeatLayout="Flow" RepeatDirection="Horizontal" SelectedItemStyle-BorderStyle="Inset" >
<ItemTemplate>
<asp:ImageButton ID="imgAvatarSelect" runat="server" OnCommand="Buttons_CommandEvent" ImageUrl='<%# Eval("FileName") %>' CommandArgument='<%# Eval("FileName") %>' CommandName="Select"/>
</ItemTemplate>
</asp:DataList>
</div>
When I use Inline for the "CommandArgument" My onCommand event wont get fired, but when I take it out it works fine.
I I found the control like this inside my code behind:
//void dlAvatar_ItemCreated(object sender, DataListItemEventArgs e)
//{
// int i = 0;
// object a = e.Item.FindControl("imgChoose");
// ImageButton a2 = a as ImageButton;
// if (a2 != null)
// {
// a2.CommandArgument = ((AvatarPicture)e.Item.DataItem).FileName;
// }
//}
but, it finds the control and sets the value. but the commandArgument never changes its value.
And yes, its commented out because it wasnt working.
Any ideas?
1 line of code equals many bugs. So don't write any!!
|
|
|
|
|
Ista wrote: but, it finds the control and sets the value. but the commandArgument never changes its value.
+ Are you sure you want to use the imgChoose or imgAvatarSelect id?
+ Here, you are trying to set the CommandArgument property of the imagebutton in both the ItemCreated handler and the data binding expression. And you may already know that the ItemCreated event happens before the data DataBound event where the binding expression is normally executed. So if you want to use the ItemCreated event, you should not use the data binding expression, otherwise the CommandArgument property will be reset.
|
|
|
|
|
I tried at just usiing the data binding expression. And it wont fire. But if I delete the CommandArgument it doesn't fire. ( OnCommand event )
Maybe I should create the the DataBind event, that might be a work around.
I did the ItemCreated out of desparation.
Nick
1 line of code equals many bugs. So don't write any!!
|
|
|
|
|
Ista wrote: I tried at just usiing the data binding expression. And it wont fire. But if I delete the CommandArgument it doesn't fire. ( OnCommand event )
Normally, you only need to use the data binding expression to simply set the CommandArgument property of the ImageButton. Have you tried using the ItemCommand event of the DataList control and see if it is fired? Have you viewed the page source and checked the id/name of the imagebutton?
|
|
|
|