|
if (FileUploadPicture3.PostedFile.ContentLength!=0)
{
//cmd==command
//Add picture3 in Database
Stream imgStream2 = FileUploadPicture3.PostedFile.InputStream;
int imgLen2 = FileUploadPicture3.PostedFile.ContentLength;
byte[] imgBinaryData2 = new byte[imgLen2];
int o = imgStream2.Read(imgBinaryData2, 0, imgLen2);
SqlParameter param5 = new SqlParameter("@Picture3", SqlDbType.Image);
param5.Value = imgBinaryData2;
cmd.Parameters.Add(param5);
//for retriev image:
try
{
byte[] barrImg3 = (byte[])rrd.GetValue(rrd.GetOrdinal("Picture3"));
string strfn3 = root + @"\iimage\" + rrd.GetValue(rrd.GetOrdinal("Picture3")).ToString() + "c3.gif";
FileStream fs3 = new FileStream(strfn3, FileMode.Create, FileAccess.Write);
fs3.Write(barrImg3, 0, barrImg3.Length);
fs3.Flush();
string strpath3 = "~/iimage/" + rrd.GetValue(rrd.GetOrdinal("Picture3")).ToString() + "c3.gif";
//thumbnail #3
if (fs3.Length != 0)
{
fs3.Close();
System.Drawing.Image img3 = System.Drawing.Image.FromFile(Server.MapPath(strpath3));
System.Drawing.Image thumbnailImage3 = img3.GetThumbnailImage(100, 100, new System.Drawing.Image.GetThumbnailImageAbort(ThumbnailCallBack), IntPtr.Zero);
MemoryStream imageStream3 = new MemoryStream();
thumbnailImage3.Save(Server.MapPath("~/image/thumbc3.gif"), System.Drawing.Imaging.ImageFormat.Gif);
byte[] imageContant3 = new byte[imageStream3.Length];
Response.Clear();
h3.ImageUrl = "~/image/thumbc3.gif";
h3.NavigateUrl = "show_picture.aspx?id=" + id + "&type=cp3&name=church&profile=adminupdate";
}
else
{
h3.Visible = false;
}
}
catch (Exception ex) { }
|
|
|
|
|
Hi,
I develop a site named www.abc.com . When I want to do a specific job on this site the full URL is shown such as www.abc.com/abc/abc. But I only want to see www.abc.com in URL not the full path. Please help me with code in PHP or Java Script.
Kunal maity
|
|
|
|
|
There are only a few ways to do this. You can either:
A) create the index page so that it is actually the whole site (bad idea)
B) use a frame in the main page to call the other pages (still a bad idea)
Brad
Australian
- bryce on "Problems with Code Project"
*sigh* Maunder's been coding again...
|
|
|
|
|
use Server.Redirect() for new pages..
|
|
|
|
|
|
You tell To use Server.Redirect() But How I use this please tell. Waiting for ur replay
|
|
|
|
|
Use this javascript function
its a bit dutch (cause i am) but you can use it like this:
getPage('http://yoursite.com/yourpage.html','divID')
and tadaa! it fills the div with the content of the page
var xmlHttp
function GetXmlHttpObject()
{
// XML object maken
var objXMLHttp=null
if (window.XMLHttpRequest) // FireFox
{
objXMLHttp=new XMLHttpRequest()
}
else if (window.ActiveXObject) // IE
{
objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
}
return objXMLHttp
}
function getPage(str,doel)
{
if (str.length==0)
{
document.getElementById(doel).innerHTML=""
return
}
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
{
alert ("Browser does not support HTTP Request")
return
}
var url=str;
xmlHttp.onreadystatechange = function stateChanged()
{
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{
document.getElementById(doel).innerHTML=xmlHttp.responseText
}
}
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}
Stef
|
|
|
|
|
Hi,
Can any one tell me how to validate an HTML form which
contains fields like Name,Address, Email,phone no.
preventing the user from enterig incorrect data.
thanks and regards
prashant
|
|
|
|
|
That would involve using a scripting language like PHP or Javascript. Here are a few examples that might help:
PHP Mail
Javascript Form Validation
Trinity: Neo... nobody has ever done this before.
Neo: That's why it's going to work.
|
|
|
|
|
There are 2 ways to do it
1) at server side
2) st client side
If security is not the concern and efficiency is more important use client side scripting like javascript
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
Can anyone give me an example how to connect to MsAccess and retrive it to size paging wit PHP?
Thanks
&nbps;Socheat
................
|
|
|
|
|
This might help: PHP Database
Trinity: Neo... nobody has ever done this before.
Neo: That's why it's going to work.
|
|
|
|
|
Thank for your reply back
................
|
|
|
|
|
I have nothing to add on the technical side, however I would like to advise you against using Access. You are much better off using a better quality project such as MySQL, Oracle, Postgre or MsSQL [Express]. These products are much more accepted in the community, Access is a toy.
Brad
Australian
- Bradml on "MVP Status"
If this was posted in a programming board please rate my answer
|
|
|
|
|
Thanks in advanced i'll try my best
Socheat
................
|
|
|
|
|
Bradml wrote: Access is a toy
Not really. You can a considerably DB-intensive busy website on Access with no issues. You get a benefit of portability and being able to FTP down/up a full snapshot of the DB. Not quite as simple to do with My/MS-SQL. However I admit that in many other areas, Access doesn't shine at all compared to actual database servers.
"For fifty bucks I'd put my face in their soup and blow." - George Costanza CP article: SmartPager - a Flickr-style pager control with go-to-page popup layer.
|
|
|
|
|
Hi there .i just need a way to make different kinds of links
Give an example please,if u have the time
thanks
|
|
|
|
|
In what way do you want the links to be different?
---
single minded; short sighted; long gone;
|
|
|
|
|
i create css for a link ok?and every link on the page follows this rule.i don't want that
i want some of the links for example to have different color or hover behaviour
thanks
|
|
|
|
|
Here are some examples on how you can set style on links:
All links with class="Info":
a.Info { color: #fff; }
All links within an element with class="Info":
.Info a { color: #000; }
All links within an element with id="Info":
#Info a { color: #f00; }
All links within a div tag within an element with class="Info":
.Info div a { color: #00f; }
All links within a div tag with class="More" within an element with class="Info":
.Info div.More a { color: #0f0; }
---
single minded; short sighted; long gone;
|
|
|
|
|
exactly what i was looking for ,man
thanks
ninja coding
|
|
|
|
|
You would have to specify a different class for each link that you want to be different. This might help you.
Trinity: Neo... nobody has ever done this before.
Neo: That's why it's going to work.
|
|
|
|
|
you mean maybe an id to each different type of links cause of what i understand they all follow the a:.... rule
so maybe this could work? #link1{..
}
,
#link2{..
is the next thing i'll try
thanks
|
|
|
|
|
xxrono wrote: you mean maybe an id to each different type of links
Use class instead of id if you have more than one occurrence of the type on a page and you are going to validate against an XHTML validating parser.
I am not sure about HTML, because I code and validate my pages using XHTML 1.0 specification, but in XHTML each id needs to be unique.
You can have multiple elements of a class and can accomplish the required formatting of groups of elements using CSS.
|
|
|
|
|
Simple CSS ? No such thing.
CSS: great idea, lousy implementation.
IMHO.
Fred
|
|
|
|