|
On the local network? You can just use File.Open etc (any of the normal ways to read a file from System.IO), if you have permissions to read it. Remember that ASP.net runs as its own user, though, so setting up the network permissions might be tricky.
|
|
|
|
|
ya i dont have permissions to read it but i have a user name and password who has the permission to read so i have to pass this parameters in the code and to read the file
|
|
|
|
|
Getting network resources under a different user name is (on Windows anyway) pretty tricky. You'd probably do better asking your network admin for read permissions on that file.
|
|
|
|
|
I am working in a c# code generator project. This first version was mostly hacked out in a couple of weeks.
, Now I am having qualms , regarding if I should publish it or simply keep it for myself ( I mean , not out of selfishness , but due to the fact that a comercial product needs a lot more work than an only-for-your-eyes tool, plus I get the impression that code generators are not very popular these days ).
Currently the tool generates the following :
Stored procedures for the tables (SQL Server only)
Business objects
Data Access Layer
A basic navigation menu
A list view for the objects.
Any feedback will be greatly appreciated.
|
|
|
|
|
Most developers worth paying build their own code generator as part of their "framework". Most of us also run up against this same question, should I publish? I predict that almost no one will actually pay money for it if/when you do publish (remember we all built our own).
There is one benefit you will gain from it if you do go on to publish it. You will learn the difference between corporate and commercial grade software. What a corporate or you will accept to get the job done and what you can actually sell are very different animals.
Good luck!
[edit]
By all means you should write an article and publish that way, this will also be instructive without the staggering burden of trying to make a commercial product. It may get ragged mildly as being like many others but so what!
[/edit]
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Thanks for the feedback.
One of my thoughts was to polish it enough so that even a non-programmer could use it ( but that is an altogether different creature which would probably take months to complete ).
As-is it would probably be usefull only for novice programmers ( < 1 year experience ).Anyhow , I started this project because the company I'm in makes everything by hand and I couldn't stand the tedium of writting n-tier apps by hand.
|
|
|
|
|
Armando de la Torre wrote: I couldn't stand the tedium of writting n-tier apps by hand.
Yup thats why we wrtie em. Mine started life in VB5 back in the 90s and even then I snaffled it from another dev I was working with. It's been rewriten in 3 different languages using different protocols and targetting different databases, currently Oracle and SQL Server. Still does basically the same thing for the database but now does all the WCF model and DAL stuff with an initial ViewModel shell but this is not really valid any more.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
That's fair enough, but there are already code generators on the market. Some are paid for, and some are free. It would be worth taking a look at what they have to offer and see how they are packaged.
|
|
|
|
|
Mycroft Holmes wrote: I predict that almost no one will actually pay money for it if/when you do publish (remember we all built our own).
Hmmm... I was thinking in selling it at a VERY affordable price ( e.g USD $20 - 25 , trainning videos included ). My bet is that it will draw the attention of novice programmers, but mostly it will be done just for the experience of getting a comercial product on-line.
Once again , thanks for the feedback.
|
|
|
|
|
Publish it here, at least it's like a code review with many experts with many years experience in a wide variety of scenarios giving you feedback.
|
|
|
|
|
I am doing a project which requires me to have a link from one page that will direct/take me to another page. How can i do this..?
|
|
|
|
|
Do not cross post - pick a forum and post in that forum only!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
sorry.! i was not sure whether to post in C# or ASP.Net
|
|
|
|
|
Go read a book, this is ridiculously easy.
|
|
|
|
|
Easiest way :
response.redirect("MyOtherPage.aspx");
if you need to pass data you can use the session object ( e.g Session["firstPage"] = myObject) and retrieve it from the second page ( many programmers see the session as the root-of-all-evils, but I think its ok to use it to pass small( <10k ) object).
|
|
|
|
|
Hi,
I am having a problem with the Graphics Object in the Paint Event.
when I use Graphics g=e.Graphics in the Paint Event handler and then
I go and and use g.DrawImage, etc
textboxes on the same form work properly, but when I add the statement, this.Invalidate(); in the Paint event
the draws will auto update, but the textbox's cursor dissapears
I can still enter text
but it seems the textbox's event and the Paint event are causing troubles.
I am trying to create a 2d racing game for an academic project and require gdi+ or xna , I chose to start in GDI+ and I am drawing all my menus with DrawString method, but when I want input say player name, I choose to add a textbox and get it from there, since my drawing canvas is the whole form, I solved the problem using a panel to draw in, had double buffering issues which I solved but then I have these conflicts with the windows form controls.
Any assistance is highly recommended
Jase
|
|
|
|
|
Why are you calling Invalidate in the Paint event?? All you're doing is constantly telling the control to repaint itself from inside the Painting code of the control! You don't see a problem with this?
|
|
|
|
|
Hi Jase,
I agree with what Dave said; Invalidate does not belong in the Paint handler, the Paint handler should paint, and do nothing else; and elsewhere Invalidate/Refresh/Update should be called when something has changed in such a way that a repaint is necessary. If you want a sequence of frames, don't organize it in such a way that Paint calls Invalidate to call Paint again, instead use an explicit sequencing mechanism such as a periodic timer.
For best performance, you should keep your Paint handler code minimal:
- no blocking calls (e.g. no delays, no database access!);
- at best: no creation of objects (keep the Pens, Fonts, Brushes you need in class members, create them once and reuse them)
- if you must create an object, make sure you either keep it around for reuse OR dispose of it properly (calling Dispose for those classes that offer it).
|
|
|
|
|
Luc,
I noticed this anomaly with the doublebuffered control:
1. I use a different namespace from your animation, say PanelForm (or class):
and when I try to add controls on my form with the panel, in the Windows Form Designer,
it will add the following extra syntax in bold:
(in bold)
this.panel1 = new PanelForm.PanelForm.DoubleBufferedPanel();
and during a compile I get an error so the following is correct:
this.panel1 = new Menu.DoubleBufferedPanel(); (Removing the extra PanelForm. fixes the problem)
How come everytime I resize the panel or add something on the same form, it adds the Panel. extra in between PanelForm.Double Buffered -> PanelForm.PanelForm.DoubleBuffered in Windows Form Designer?
I can easily delete it everytime but after say 10 times it becomes frustrating.
2.I understand how you are saying do not use Invalidate in the Paint Event handler,
eventually when we put a car image on the form and use Vectors to move it, Invalidate will need to be done else the car will not move by itself ? or should I use a timer to achieve the same result !
I am just wanting to know, having GDI+ Graphics like Drawstring, DrawRectangle coupled with textboxes and labels is bad form ? and bad design ?
I can send some code over if you cannot understand what I am trying to achieve ? Would that be better?
I am a novice c# programmer, Object Orientation is new to me, so I am still learning the fundamentals after so much time on procedural old style programming !
Thanks also Dave for your feedback !
Regards,
Jase
|
|
|
|
|
hi Jase,
1.
you probably created a mess with classes inside other classes. In my example, I had public class DoubleBufferedPanel : Panel {...} directly in its namespace, and that is what I recommend.
2.
Stop using confusing names, a namespace should not be called PanelForm as it is NOT a form.
3.
AU Jase wrote: or should I use a timer to achieve the same result !
I already answered that one twice.
4.
AU Jase wrote: Graphics ... coupled with textboxes and labels is bad form ?
Not necessarily, however you could make another mess of it; and it may harm performance and cause flicker.
5.
IMO you need to study the basics first, walk before you run. Why don't you spend a day or two on an introductory book to C# and Windows programming? (And no, I don't have a recommendation at hand).
|
|
|
|
|
Hi i have a Already existed excel file in my root path of the application,
In tht i have to clear particular cells range like A2 to F75.
And i have insert my new datas into those cells,after tht its has to getting save on enduser side,
Please guide me,any one having idea baout this
Thanks & Regards,
Member 3879881,
please don't forget to vote on the post
|
|
|
|
|
|
This is a good starting point: http://csharp.net-informations.com/excel/csharp-open-excel.htm[^]
The UsedRange property of Microsoft.Office.Interop.Excel.Worksheet gives the cells that have values. The Microsoft.Office.Interop.Excel.Range type represents ranges of cells. The Cells property of Range is a two-dimensional array that lets you access individual cells. The Value2 property of a Range representing a single cell gives you the value of that cell.
|
|
|
|
|
Hi
I'm trying to set envronment variables programatically using below code. But its failed to set the environment variables.
System.Environment.SetEnvironmentVariable("PATH", "C:\Dev");
Thanks in advance
|
|
|
|
|
Do you see any error messages?
//daniel
|
|
|
|