Friday, September 29, 2006

Help the blog!

to help this blog, please read my posts and see - if you think i need to add/update/delete somethin form the post, please send to my email to: nimrod95@gmail.com

Saturday, September 23, 2006

Use a *.ascx files

Hello, in this article we learn how to use the *.ascx files.
General information.
the ascx files are a codes, but not a pages in your site just a part of a one or more pages.
How to write this file?
To write an ascx files you use the text editor you use to write aspx files and you cam write code in aspx, html and all the codes you wont (like a aspx file). when you save the file you need to give it a ascx ending, not aspx ending, like this: FileName.ascx
How to use ascx files?
to use a ascx files we use this code in the start of the page:
<%@ Register TagPrefix="GM" TagName="style" Src="style.ascx" %>
TagPrefix was the NikeName of the tag we use.
TagName was the name of the tag we use
Src was the url of the ascx file we use.
and when you wont to pot the code from the ascx file in the page, use this code:
<Gm:style id="GMstyle" runat="server" />
Gm is the NikeName I give to the previous code we use
id is the id of the code, its not change nothing
runat you need to put in all of the codes we use.
Do you find a error on my article? do you wond to add somethin to my article? send to my email to nimrod95@gmail.com
Success!!!



Friday, September 22, 2006

accessdatasource - how to use

General information
the accessdatasource code use to login to a accses (there are anther code to login to anther databace, like sql sever).
How to use
to use accessdatasource we write this code:

<asp:accessdatasource id="AccessDataSource8" selectcommand="SELECT 4 * FROM [bla] WHERE ([bla] = ?) ORDER BY [id] DESC" datafile="db.mdb" runat="server">


and this are the parameters we use -
id - the id of the accessdatasource
runat - we need to write it in all the asp.net codes we use
datafile - the accses mdb file we use
selectcommand - the sql code. you can see a good bonus we got in the WHERE
- the ? we use in the sql ([cla] = ?)
- a request.querystring for the ? in the sql. you can see the name = "bla" amd the QuerystringField = "site". site is the request.querystrung paramater we use, its do somethin like this - request.querystring("site"). if the url are bla.asp?site=aa the ? was aa.

Anther things like QuerystringParamater
you can do anther things like QuerystringParamater, but not wite request.querystring.

it use a cookie.
<asp:CookieParameter Type="String" Name="site" CookieName="sesshhfgh"></asp:CookieParameter>
it use a session.
<asp:SessionParameter SessionField="sdf" Type="String" Name="site2"></asp:SessionParameter>
Use the accessdatasource with repater, datagrid and more.
to use the accessdatasource in a repater,datagrid or anther, we use this code -
datasourceid="AccessDataSource8"
and AccessDataSource8 was the id of the accessdatasource.
you add it to the code like this -

and it work.

Succses!





Thursday, September 21, 2006

fix the "Operation must use an updateable query" error

Hello every one! in this small article i say how to fix the "Operation must use an updateable query" error.
Operation must use an updateable query - What is The problem?
this is a premmision error and it's happen on you use Insrst, Edit or Delete query.
Fix the problem on the server
if the problem happen on ypur server (not IIS) you need to send a email to your server admin ans he give the prommision to the folder of the DataBace (not the file!).
Give the premmision one your IIS
to fix this problem on your IIS you can do 2 things, I recommend the first one.
1 - you can use the Microsoft Visual Web Developer 2005 software to do it. firs, setup the software from http://msdn.microsoft.com/vstudio/express/vwd/download/ this software use to write an asp.net code, but we can use it to give a premmision. to open the site with premmision, open the asp.net code on this software and click on
and then the file open with all the premmision it need.
2 -if you don't wont to use this software, you can do this:
I not responsible to the result!
go to:
tools->folder options->view - >use simple file sharing
and them it's work, but i not sure it's work!



seccess, Nimrod Rotem.