파일 업로드로 파일을 찾고
이미지넣기버튼 누르면 자바스크립트가 실행되고 -실행즉시 c#이벤트(파일업로드및 히든imgpath에 값넣어주기)
-->자바스크립트 imgpath로 html에디터에 넣어주기
이렇게되는건데
문제는 c#이벤트처리후 남은 자바스크립트문쪽으로 가지 않는거같은데 ..ㅠㅠ 어떻게하죠..ㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠ
뷰--------------
<asp:FileUpload ID=\"FileUpload1\" runat=\"server\" Height=\"24px\" Font-Names=\"나눔고딕\" />
<input type=\"hidden\" id=\"imagepath\" runat=\"server\" value=\"\">
<input type=button =\"Toggle(\'InsertImage\');\" value=이미지넣기 id=\"Button1\">
<asp:Button ID=\"BtnUpFile\" runat=\"server\" style=\"display:none;\" Height=\"24px\" =\"BtnUpFile_Click\"/>
자바스크립트----------------
else if (text_mode == \"InsertImage\")
{
<%= Page.GetPostBackEventReference(BtnUpFile) %> <------이쪽에서 asp.net 이벤트로넘어감
theImg = document.all.imagepath.value;
if (theImg != \"\")
document.execCommand(\"InsertImage\", false, theImg);
}
cs--------------------
protected void BtnUpFile_Click(object sender, EventArgs e)
{
string s올라온파일이름;
string s저장경로;
s저장경로 = Server.MapPath(Request.ApplicationPath + \"/upfile\");
s올라온파일이름 = FileUpload1.FileName;
imagepath.Value = s저장경로 + \"\\\\\" + s올라온파일이름;
FileUpload1.SaveAs(s저장경로 + \"\\\\\" + s올라온파일이름);
}
웹 쿼리나 업로드 쪽은 블러킹 지원 부분이 없다오....