2008年06月26日
GoogleMaps 與 LocalSearch 應用 - 搬家更新經緯度
(1) 利用 GET 的方式傳入使用者的姓名與地址,利用 GClientGeocoder() 物件解析住址得到經緯度,然後進行定位。
(2-1) 動態建立 GMarker 來建立新目的地位置,並取得經緯度
(2-2) 利用 LocalSearch 搜尋使用者手動輸入的地址,移動至新目的地;動態建立 GMarker 來建立新目的地位置,並取得經緯度
(3) 更新經緯度確定位置
示範影片:
參考文件:Docs > Developer Guide > Services
...繼續閱讀2008年06月11日
試玩 Deep Zoom Composer WIth Silverlight Beta2
Download Deep Zoom Composer (Version 0.9.0.3)
Deep Zoom Composer 工具其實相當地易用,只要三個步驟:(1) Import (2) Compose (3) Export 即可完成。輕輕鬆鬆也可以完成類似【清明上河圖】的程式。以下範例為拼湊一本寫真集:
...繼續閱讀2008年06月9日
動態建立控制項文章整理
花了一天為了專案寫一個 SliderData 的控制項,主要用來調整各查詢條件式的組合。因為我很久沒有寫 ASP.Net 了,所以關於動態建立控制項的地方算是吃足了苦頭,重新看了幾篇文章才又建立了一些觀念,整理如下:
- Web Application 首部曲:了解 ASP.NET 基礎架構 ( 作者:朱明中 )
- Web Application 二部曲:ASP.NET 控制項架構 ( 作者:朱明中 )
- Web Application 三部曲:動態生成控制項技術 ( 作者:朱明中 )
- 在 Web Form 動態建立控制項的正確方法 ( ASP.NET 魔法學院 )
- TRULY Understanding Dynamic Controls ( Infinities Loop )
Part 1: Dynamic vs. Static
Part 2: Creating Dynamic Controls
Part 3: Adding Dynamic Controls to the Control Tree
Part 4: Because you don't know to render at design time
先放上 SliderData 示範影片,有空在把經驗放上來。
...繼續閱讀2008年04月19日
簡易的 Url Rewriting 隱藏 Querystring (三) 隱藏副檔名
上篇【簡易的 Url Rewriting 隱藏 Querystring (二) IIS 注意事項】文章,裡面講解如何設定 IIS 使得也讓副檔名【.html】得以支援 Url Rewriting 的功能。那應該有人會問類似的問題:
(1) 如果 Rewrite 的副檔名有五、六種,那豈不是要新增設定五、六次?如果有幾十種副檔名,那不是會讓人傻眼嗎?
(2) 如果我連副檔名也想要隱藏,該怎麼做呢?
...繼續閱讀簡易的 Url Rewriting 隱藏 Querystring (二) IIS 注意事項
在上一次介紹【簡易的 Url Rewriting 隱藏 Querystring】文章中,介紹如何使用 來隱藏 QueryString,如果有試著嘗試 Url Rewriting 或是眼尖的網友,會可能會發現我沒有對 IIS 另外做一些設定。
...繼續閱讀2008年04月4日
Multi-color DropDownList using C# - 顏色挑選器
參考: Multi-color DropDownList using C# By Fuad Bin Omar
之前在做案子的時候,我也有利用 DropDownList 抓取 System.Drawing.KnownColor 列舉型態,並配合 Enum.GetNames(typeof(KnownColor)) 抓取系統顏色清單,做成顏色挑選器供使用者挑選。但是卻沒有參考連結中,Fuad Bin Omar 寫得那麼完善,而且我當時也沒有考慮系統環境顏色必須忽略,例如【Active Border】。
幸好,今日在 MSDN 技術社群討論區 也有提到類似的問題,讓我搜尋到 Fuad Bin Omar 也有寫出這樣的顏色挑選器。剛剛,把 Fuad Bin Omar 的顏色挑選氣作一些調整,主要顯示顏色的部分加入 CSS,讓深色系的顏色用白色的文字來呈現顏色名稱;淺色系則使用黑色文字。比較如下:
MultiColorDDlist.aspx 程式碼,如下:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="MultiColorDDlist.aspx.cs" Inherits="MultiColorDDlist" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div style="margin-left: 50px; margin-top: 50px;">
<table>
<tr>
<td>
<asp:DropDownList ID="ddlMultiColor"
OnSelectedIndexChanged="ddlMultiColor_OnSelectedIndexChanged"
runat="server" AutoPostBack="true">
</asp:DropDownList>
</td>
<td>
<div id="msgColor" runat="server">
</div>
</td>
</tr>
</table>
</div>
</form>
</body>
</html>
MultiColorDDlist.aspx.cs 程式碼,如下:
...繼續閱讀
2008年03月26日
簡易的 Url Rewriting 隱藏 Querystring
...繼續閱讀
2008年03月20日
Accordion 控制項預設狀態設定全關閉
將 AJAX Control Toolkit Accordion 控制項預設狀態設定為全關閉狀態 :
1: <cc1:Accordion ID="MyAccordion" runat="Server" SelectedIndex="-1"
2: HeaderCssClass="accordionHeader" RequireOpenedPane="false"
3: SuppressHeaderPostbacks="true">
4: <Panes>
5: <cc1:AccordionPane>
6: <Header>標題一</Header>
7: <Content>11111111111</Content>
8: </cc1:AccordionPane>
9: </Panes>
10: <Panes>
11: <cc1:AccordionPane>
12: <Header>標題2</Header>
13: <Content>2222222222</Content>
14: </cc1:AccordionPane>
15: </Panes>
16: </cc1:Accordion>
重要在於 RequireOpenedPane="false" (是否必需打開Pane) 與 SelectedIndex="-1" (預設 Pane 的 index) 設定
2008年03月1日
AJAX Control Toolkit 更新至 20229 版本
Major Fixes
- ValidatorCallout supports styling the popup using CSS and server-side validation.
- ListSearch has enabled the options of searching for sub-strings in the list items and clearing the search query if no match is found.
- AutoComplete only queries for matches when the user types a character.
網頁載入中,請稍候...