wow how can i go to google ;)
mrcooll
Posts
-
ms OutLook! -
working on treeviewthe following code snippet generate classes nodes has a childe nodes "Semester"
private void FillTreeNodes()
{
SysClass sysclass = new SysClass();
DataSet ds= sysclass.GetAllSysClasss();TreeNode node; foreach (DataRow row in ds.Tables\[0\].Rows) { node = new TreeNode(); node.Text = row\["Class"\].ToString(); node.Value = row\["ClassId"\].ToString(); node.NavigateUrl = "UpdateClass.aspx?classId="+node.Value; GenerateSemesters(node,int.Parse(row\["ClassId"\].ToString())); tree1.Nodes.Add(node); } } private void GenerateSemesters(TreeNode node,int classid) { Semester semester=new Semester(); DataSet ds = semester.GetAllSemesters(classid); TreeNode childenode; foreach (DataRow row in ds.Tables\[0\].Rows) { childenode = new TreeNode(); childenode.Text = row\["SemesterName"\].ToString(); childenode.Value = row\["SemesterId"\].ToString(); childenode.NavigateUrl = "Updatesemester.aspx?semesterId=" + childenode.Value; node.ChildNodes.Add(childenode); } }
i forget to minsion that is the best way for filling treeview is recursively !
modified on Monday, March 29, 2010 4:46 AM
-
Export Gridview to PDFhi, I think u receiving the watermark on the converted pdf becouse it not license u need to buy it my friend i used this commponent for demo perpose before buy it and install it on the server http://jib.imagine.com.jo/JordanataGlance/tabid/63/language/en-US/Default.aspx[^]
-
Export Gridview to PDFhttp://www.asppdf.com/[^] I used this product http://www.html-to-pdf.net/ExpertPDF-HtmlToPdf-Converter.aspx[^]
''' <summary>
''' Convert the HTML code from the specified URL to a PDF document and send the
''' document as an attachment to the browser
''' </summary>
''' <remarks></remarks>
Private Sub ConvertURLToPDF(ByVal url As String)Dim urlToConvert As String = url Dim selectablePDF As Boolean = True ' Create the PDF converter. Optionally you can specify the virtual browser ' width as parameter. 1024 pixels is default, 0 means autodetect Dim pdfConverter As PdfConverter = New PdfConverter() ' set the license key 'pdfConverter.LicenseKey = "put your license key here" ' set the converter options pdfConverter.PdfDocumentOptions.PdfPageSize = PdfPageSize.A4 pdfConverter.PdfDocumentOptions.PdfCompressionLevel = PdfCompressionLevel.Normal pdfConverter.PdfDocumentOptions.PdfPageOrientation = PDFPageOrientation.Portrait ' set if header and footer are shown in the PDF - optional - default is false pdfConverter.PdfDocumentOptions.ShowHeader = False pdfConverter.PdfDocumentOptions.ShowFooter = False ' set to generate a pdf with selectable text or a pdf with embedded image - optional - default is true pdfConverter.PdfDocumentOptions.GenerateSelectablePdf = True ' set if the HTML content is resized if necessary to fit the PDF page width - optional - default is true pdfConverter.PdfDocumentOptions.FitWidth = True ' set the embedded fonts option - optional - default is false pdfConverter.PdfDocumentOptions.EmbedFonts = False ' set the live HTTP links option - optional - default is true pdfConverter.PdfDocumentOptions.LiveUrlsEnabled = True ' set if the JavaScript is enabled during conversion to a PDF with selectable text ' - optional - default is false pdfConverter.ScriptsEnabled = False ' set if the Active
-
My System Hangs when I double click on aspx or cs page.Restart your pc :)
-
Export Gridview to PDFHi, i faced this issue last month , i think the best way to do convreting html to pdf is to use a component for it try to google it
-
MCTS 7-536 Dumps -
MCTS 7-536 Dumpswhich one is it the framework or web application?
-
C# DataTablefill it distinct !!!!:cool:
-
nullable date time pickerHi, Thanks for your replay,i post this question back in October 19, 2008 m very happy that you post the an answer. :-D
-
pdf convertorHello all, m searching for a component for converting an aspx page to downloadable pdf. i find some stuff but it doesnt support utf-8 encoding " the aspx pages is in engish and arabic language" i may also use it in dotnetnuke portal so if any body know any thing about this thing i will be more happy to share it with me . Thx in advance.
-
How to make single instance?hi , have a look to this link it will help u link
-
[Solved]Unable to access web application on intranet [modified]ok try to reset iis by start-run- type iisreset. if it doesnt work restart the computer and if it doesnt work throw it from the window :laugh: may be its a permission issue !!!
-
Question about event validationhi m not following u ,did u tried ValidationsGroup
-
[Solved]Unable to access web application on intranet [modified]hi try to check the antivirus software it might block the traffic , if u r using norton internet security or symantic try to disable it. or try to browse u r to share a folder and view it from defferent computer in the lan ,if you cant access the pc check work group names good luck !!!
-
C# IP Scannerhello , try to implement this algorithm
//this is not code
foreath(ipaddress ip in GetAllIps()){if( CreateThread(Ping(ip))){
AddToList(ip);
}}
-
Sending Mail Problemyou need to contact u r host and ask them about email settings. u can try to set SmtpServer property to '127.0.0.1'
-
grid view page indexhi all, how can i maintain gridview page index while navigation from the form and getting back by browser back button. i tried to use this approach:
public int PageIndex
{get { if (Session\["DGApplicationPageIndex"\] != null) { return (int)Session\["DGApplicationPageIndex"\]; } else { return 0; } } set { if (value != -1) { Session\["DGApplicationPageIndex"\] = value; } else { Session\["DGApplicationPageIndex"\] = null; } } }
protected void DGApplication_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
DoSearch(TextBox1.Text);
DGApplication.PageIndex = e.NewPageIndex;
PageIndex = DGApplication.PageIndex;
}protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
DoSearch("-1");
}
DGApplication.PageIndex = PageIndex;
PageIndex = -1;}
-
Index was out of range. Must be non-negative and less than the size of the collection.Please don't cross post.
if(e.RowIndex==-1)
return; -
"Who is Logged in" modulehi all i want to list all of the logged in users on a page , i did it fine but i have a problem when the user close the browser i cant remove them from the list, how can i get use of Session_End in the Global.asax . this code is in Global.asax
private Code.BL.Users.SysUserCollection users = new Code.BL.Users.SysUserCollection();
public Code.BL.Users.SysUserCollection OnLineUsers
{
get { return users; }
set { users = value; }
}this code is in BL
public class SysUserCollection : IList<SysUser>
{List<SysUser> users = new List<SysUser>(); #region IList<SysUser> Members public int IndexOf(SysUser item) { return users.IndexOf(item); } public void Insert(int index, SysUser item) { throw new Exception("The method or operation is not implemented."); } public void RemoveAt(int index) { users.RemoveAt(index); } public SysUser this\[int index\] { get { return users\[index\]; } set { users\[index\] = value; } } #endregion #region ICollection<SysUser> Members public void Add(SysUser item) { if (!this.Contains(item)) { users.Add(item); } } public void Clear() { users.Clear(); } public bool Contains(SysUser item) { foreach (SysUser user in users) { if (user.UserId == item.UserId) return true; } return false; } public void CopyTo(SysUser\[\] array, int arrayIndex) { throw new Exception("The method or operation is not implemented."); } public int Count { get { return users.Count; } } public bool IsReadOnly { get { throw new Exception("The method or operation is not implemented."); } } public bool Remove(SysUser item) { foreach (SysUser user in users) { if (user.UserId == item.UserId) { return users.Remove(user); } }