如何获取被点击的文字
tabReserveInfo.Rows[i].Cells[j].Text = " <a href=\ "NoteInfo.aspx?ID={0}\ "/> " + DateTime.Now.ToShortDateString() + " <br> ";
以上句子是在一个table控件的单元格填入一个日期,并且日期加了一个链接。当单击单元格中显示的日期时会链接到页面NoteInfo.aspx,我现在想把被点击的日期传到新打开的页面中,如何获取这个被点击的文字?
------解决方案--------------------string nowtime=DateTime.Now.ToShortDateString();
tabReserveInfo.Rows[i].Cells[j].Text = " <a href=\ "NoteInfo.aspx?time= "+nowtime+ "&ID={0}\ "/> " + nowtime + " <br> ";
或者用javascript
------解决方案--------------------直接写在参数中就好了.
id={0}&d= "+DateTime.Now.ToShortDateString() + "\ "/> " + ....
------解决方案--------------------tabReserveInfo.Rows[i].Cells[j].Text = " <a href=\ "NoteInfo.aspx?id={0}&d= "+DateTime.Now.ToShortDateString()+ "\ "/> " + DateTime.Now.ToShortDateString() + " <br/> ";
------解决方案-------------------- " <a href=\ "NoteInfo.aspx?id={0}&d= "+ 这里加上你要传的日期值 + "\ "/> "