achristov 12 Junior Poster in Training

1. This is a VS template. Install it first.
2. Open VS and create a web site using the newly installed template.
3. The main folder of your new web site contains (amongst the others) the file Handler.ashx. It is responsible for handling requests for fetching images from your site. (In fact the SQL Server as an underlying image storage.)
4. In the App_Code folder you'll find the support this handler needs (and not only!) - all the image manipulation methods you do and you also might need: fetching, inserting and deleting of albums and images. It also contains a couple of helper routines you may find useful.
Look at the code carefuly, try to understand it, then modify it to suit your needs.
And as usual, "use the source, Luke!"
Good Luck.

achristov 12 Junior Poster in Training

Take a look at the PhotoHandler here: http://www.asp.net/downloads/starter-kits/personal/

achristov 12 Junior Poster in Training

Hi guys,

Has someone measured how many lines of code (approx) she/he produces daily? NLoc utility or OxyProject Metrics help in counting number of lines.

Thanks!

achristov 12 Junior Poster in Training

Try to clean the project/website by deleting the binaries (in C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files) then rebuild the application. asp.net uses "shadow copy" of binaries, so make sure everything is absolutely clean. maybe you'll also need to kill the asp.net framework process (aspnet_wp.dll or may have different name, look in the web).

achristov 12 Junior Poster in Training

javascript is especially useful serverside, where ASP.NET is absolutely weak... ;) from this point on you can guess my answer. Or maybe we wouldn't need servers in the future...

achristov 12 Junior Poster in Training

Maybe you mean Visual Studio 2005? You can't - use SSMS (SQL Server Management Studio).

achristov 12 Junior Poster in Training

First of all the line

int MST = Convert.ToInt32(Convert.ToInt32(DetailsView3.Rows[0].Cells[1].Text));

must throw an exception. Take a look and you'll find out why.
Second, using a switch is the preferred coding practice in such cases.
Third, it is not possible that the code does not work. If you doubt this put a breakpoint on the first line (the erroneous one) and look what you have in MST. You may also place a tracepoint and look in VS Output tool window.
Fourth, and maybe last, it is a wrong practice to name local variables MST. Use mst instead. Remember, code is more read than written.
Happy coding :)

achristov 12 Junior Poster in Training

What xml files?!? This is new to this thread! Just type SCHEMA TRANSFER in SSMS (Sql Server Management Studio) followed by the tablename. That's all you have to do.

achristov 12 Junior Poster in Training

Just create the schema and use SCHEMA TRANSFER to move objects to your newly created schema. After you have your table(s) in the schema you will be able to issue absolutely the same (syntactically) query against both sql servers.

achristov 12 Junior Poster in Training

You should have

<appSettings><add key="networkDrive" value="C:\test"/></appSettings>

in your web.config. The line

<add key="networkDrive" value="C:\test"/>

is allowed only within appSettings section. The section appSettings should be one and only one in the whole config file.

achristov 12 Junior Poster in Training

Nevermind! You still have two appConfig sections. The fact that the first one does not have child nodes does not mean that the sections are getting merged or otherwise processed by the configuration manager. Once it encounters the first section it processes it and decides that the job's finished. You offer it extra work with the second section so it complains.

achristov 12 Junior Poster in Training

You may use schema in MSSQL:

select * from schemaname.tablename.

Thus your query would look the same.

achristov 12 Junior Poster in Training

This is exactly what you have to expect! You cannot modify web.config from the web application/web site/web service that is configured from this web.config. Just remember that fact as if it is an axiom. Later on you'll figure out why...

achristov 12 Junior Poster in Training

<appSettings/>

<!-- other stuff here... -->

<appSettings>
<add key="networkDrive" value="C:\test"/>
</appSettings>

This is what is wrong. You have two appSettings sections: an empty one (the above) and your modified one. You should keep only one of them.
If you find this answer satisfactory, please add to my reputation.

achristov 12 Junior Poster in Training

The point is not sending, but viewing the messages. The messages for a user should carry some information about the receiver. Most probably the

MembershipUser

provider key. Check for authenticated user and load only the messages for this user. Use

Page.User

property. If no user has been logged in the Name property is empty. Otherwise it contains the logon name of a person. Use it to get its corresponding

MembershipUser

provider key and load corresponding messages. Note: set

<authentication mode="Forms">

in your web.config.

If this answers your question, please add to my reputation.

achristov 12 Junior Poster in Training

Perhaps it is better to spend some time and learn the answers to such important questions instead of placing incredibly low bids on sites like www.rentacoder.com

achristov 12 Junior Poster in Training

Kids often do more important things than adults. Read "The Little Prince" by Antoine de Saint-Exupéry to get to the point. (Or many other books...)

achristov 12 Junior Poster in Training

VB is the bad stuff, this is for sure ;) If you find my answers satisfactory, please add to my reputation.

achristov 12 Junior Poster in Training

VS Professional (no "full" release) is quite functionally rich, there are other editions too: http://www.microsoft.com/visualstudio/en-us/products/teamsystem/default.mspx#compare_products. SharpDevelop is the descendant to MonoDevelop - an interesting project, free (GPL-ed - not quite sure). Also check here: http://csharp-source.net/open-source/ides

achristov 12 Junior Poster in Training

More than ASP.NET? You gotta be kidding. :) PHP is poor man's ASP.NET, but if you like it go for it!

achristov 12 Junior Poster in Training

...or you can use Mono, Apache, Linux and MySQL if expenses are critical for you. This is still ASP.NET.

peter_budo commented: Yes in deed, Mono project is another option +16
achristov 12 Junior Poster in Training

In general set the @Page attribute trace="true" to locate the control. Then you'll easily figure out how to "FilndControl()" it. Read MSDN on FindControl() also. This should be enough!

achristov 12 Junior Poster in Training

don't do that! there are at least two other options SQL server offers:
1. use autoincrement fields, or
2. use guids
In either case the server will handle the creation of new value for a PK.

achristov 12 Junior Poster in Training

Your question is not quite clear. What do you want to do? Be more precise in order to get answered.

achristov 12 Junior Poster in Training

please reply

You have at least two choices:
1. use the lock(...) in C#, or use SqlTransaction (http://www.knowdotnet.com/articles/transactions.html) ; there should be only one instance of the application accessing the db. If you cannot guarantee that then
2. use BEGIN TRAN, COMMIT, ROLLBACK in SQL.
Read about all these and learn how to use them, copy & paste is not a good way to solve any such problem.
Wish you success!

achristov 12 Junior Poster in Training

You need your brain and your fingers. No link can help you.

achristov 12 Junior Poster in Training
achristov 12 Junior Poster in Training

HttpSesssion (if that's what you mean) has nothing to do with vs200x. If you merge both projects you'll be able to use same session in any page despite its original belonging. Otherwise you should implement your own session that has to be transfered between both sites.

achristov 12 Junior Poster in Training

What tool are you using to build the project?

achristov 12 Junior Poster in Training

Often controls are buried into deeper level of control hierarchy. Obviously the control you were trying to find is not in the next level. Add trace="true" in your Page directive attributes and try to locate the control. Also, it is often decorated with some additional symbols, especially if it is repeatedly created by, say, a data control. Try to add a TextBox in a Repeater and watch the control list...

achristov 12 Junior Poster in Training

Again, almost! C# goes a bit closer to the CLR specs...

achristov 12 Junior Poster in Training

Depends on your preferences - whatever you choose the results are (almost!) the same. My preferences, however, tend to C#. Moreover C# utilizes .NET CLR capabilities a bit better than VB.