Hi abishek, Thanq for your Answer.. I have checked all the Permissions IIS-DefaultWebSite-MyProj-Rightclick-Properties. Tab Virtual Directory and I have checked READ and WRITE Permissions..??? Still it doesnt solve..
Udayaraju
Posts
-
Error:A Generic Error occurred in GDI+ -
Error:A Generic Error occurred in GDI+Permissions?? in which Way.. I have tried giving all READ and WRITE permissions in Virtual Directory but it doesn't solve any problem
-
Error:A Generic Error occurred in GDI+Hi Dear, Here I am trying to upload a photo. protected void LoadImage() { string UserName = Session["UserName"].ToString(); byte[] Data = Profile.GetImageData(UserName); //Stmt Correct where profile is class if (Data != null) { MemoryStream stream = new MemoryStream(Data); Bitmap bitmap = null; bitmap = new Bitmap(stream); bitmap.Save(Server.MapPath(@"~\UserPhoto.bmp"), system.Drawing.Imaging.ImageFormat.Bmp); //Error:A Generic Error occurred in GDI+ bitmap.Dispose(); imgPhoto.ImageUrl = @"~\UserPhoto.bmp"; } } I have created virtual directory and trying to open it directly from browser
-
Error: A Generic Error occured in GDI+Hi Dear, Here I am trying to upload a photo.
protected void LoadImage() {
string UserName = Session["UserName"].ToString();byte\[\] Data = Profile.GetImageData(UserName); //Stmt Correct where profile is class if (Data != null) { MemoryStream stream = new MemoryStream(Data); Bitmap bitmap = null; bitmap = new Bitmap(stream); bitmap.Save(Server.MapPath(@"~\\UserPhoto.bmp"), system.Drawing.Imaging.ImageFormat.Bmp); //Error:A Generic Error occurred in GDI+ bitmap.Dispose(); imgPhoto.ImageUrl = @"~\\UserPhoto.bmp"; } }
I have created virtual directory and trying to open it directly from browser
-
Crystal Report in Asp.netI am trying to Implement in Asp.net itself. I tried in these way.. Is there any better approach I have specified the error Preview.crystalRptViewer.ReportSource = Info; //Error: Object reference is not set to an instance of an object
-
Crystal Report in Asp.netHi Dudes, Plz Solve these I am trying to implement a sample report in asp.net using crystal reports10.0. But i get an error of Object reference not set to an instance of an object Here's my code
public void btn_Click(object sender, EventArgs e)
{
frmPreview Preview = new frmPreview();
rptInformation Info = null;TableLogOnInfo logOnInfo = DBManager.getCrystalLogInfo(); //CorrectStatment Info = new rptInformation(); Info.Database.Tables\[0\].ApplyLogOnInfo(logOnInfo); //Correct formulaFieldDefs = Info.DataDefinition.FormulaFields; formulaFieldDef = formulaFieldDefs\["CompanyName"\]; formulaFieldDef.Text = "'" + Global.CompanyName + "'"; Preview.crystalRptViewer.ReportSource = Info; //Error }
Here I placed CrystalReportViewer in frmPreview
-
Radiobuttonlist+AJAX Modal POPup ControlI have tried a lot..but unable to find the solution.. I have removed okcontrolId property too..help me
-
Radiobuttonlist+AJAX Modal POPup ControlI am opening an panel when i click newuser linkbuttton. Panel consists of 4 diff. radiobuttons wen i select an radio button option..it should navigate to new page <asp:LinkButton ID="linkNewUser" runat="server" style="z-index: 1; left: 42px; top: 170px; position: absolute; height: 21px; width: 76px">NewUser</asp:LinkButton> <asp:Panel ID="panelSelection" runat="server" CssClass="modalPopup" style="display: none" > <asp:RadioButtonList ID="RadioButtonList1" runat="server" > <asp:ListItem Value="0">Patient</asp:ListItem> <asp:ListItem Value="1">Doctor</asp:ListItem> <asp:ListItem Value="2">Pharmacy</asp:ListItem> <asp:ListItem Value="3">Lab</asp:ListItem> </asp:RadioButtonList><br /> <p style="text-align: center;"> <asp:Button ID="OkButton" runat="server" Text="OK" OnClick="OkButton_Click" /> <asp:Button ID="CancelButton" runat="server" Text="Cancel"/> </p> </asp:Panel> <ajaxToolKit:ModalPopupExtender ID="linkNewUser_ModalPopupExtender" runat="server" TargetControlID="linkNewUser" PopupControlID="panelSelection" BackgroundCssClass="modalBackground" OkControlID="OkButton" CancelControlID="CancelButton" DropShadow="true"> </ajaxToolKit:ModalPopupExtender> protected void OkButton_Click(object sender, EventArgs e) { if (RadioButtonList1.SelectedItem.Text=="Patient") { Response.Redirect("~/PatientRegDetails.aspx"); } else if (RadioButtonList1.SelectedValue=="1") { //this has to be closed } } Here OKButton_Click event is not fired.
-
TreeView-ErrorRecursive methods?? Please help me out with an example or an article..I have never worked on it??
-
TreeView-ErrorHere I am trying to fill the tree view category and subcategory wise..see the below |Benson and Hedges |Kings Gold Falke Beverages | |-Beers | |-Bell Lager 500 ML | |-CLUB PILSENER 500 ML | |-Juices | |-Apple Juice | |-Chikooo Juice |-Food | |-MeatProducts | |-GOAT MEAT | |-Fruits | |-APPLE GREEN | |-LOCAL ORANGES |-VegeTable | | |-BEETROOT | |-TOMATO FRESH I have tried the following code..but I am able to fill only one product under one sub category. Please help me out how to??initialize and fill the data into tree view
foreach (DataRow row in table.Rows)
{
MainNode = new TreeNode(row.ItemArray[0].ToString());
MainNode.Name = row.ItemArray[0].ToString();
if (MainNode.Text == "")
{
//Stmts
}else { ChildNode = new TreeNode(row.ItemArray\[1\].ToString()); ChildNode.Name = row.ItemArray\[1\].ToString(); if (ChildNode.Text == "") { ChildNode = new TreeNode(row.ItemArray\[3\].ToString()); ChildNode.Name = row.ItemArray\[3\].ToString(); ChildNode.Tag = row.ItemArray\[2\].ToString(); if (!MainNode.Nodes.ContainsKey(ChildNode.Name)) { MainNode.Nodes.Add(ChildNode); } } else { SubNode = new TreeNode(row.ItemArray\[3\].ToString()); SubNode.Name = row.ItemArray\[3\].ToString(); SubNode.Tag = row.ItemArray\[2\].ToString(); if (!ChildNode.Nodes.ContainsKey(SubNode.Name)) { ChildNode.Nodes.Add(SubNode); } } if (!MainNode.Nodes.ContainsKey(ChildNode.Name)) { MainNode.Nodes.Add(ChildNode); } else {
//Here I am unable to understand how to fill child nodes into mainnode
//The below code is wrong
for (int i = 0; i <= MainNode.Nodes.Count; i++)
{ -
TreeViewHere I am trying to do like these Beverages | |-Beers | |-Bell Lager 500 ML | |-CLUB PILSENER 500 ML | |-Juices | |-Apple Juice | |-Chikooo Juice |-Food | |-MeatProducts | |-GOAT MEAT | |-Fruits | |-APPLE GREEN | |-LOCAL ORANGES |-VegeTable | | |-BEETROOT | |-TOMATO FRESH
-
TreeViewIf u see the above code I have problem here to fill the remaining Data. Please trace these at
else
{
SubNode = new TreeNode(row.ItemArray[3].ToString));
SubNode.Name = row.ItemArray[3].ToString);
SubNode.Tag = row.ItemArray[2].ToString);
if (!ChildNode.Nodes.ContainsKeySubNode.Name))
{
ChildNode.Nodes.Add(SubNode);
} }
if (!MainNode.Nodes.ContainsKey(ChildNode.Name))
{
MainNode.Nodes.Add(ChildNode);
}
else
{
//Here I am unable to understand how to fill child nodes into mainnode
//The below code is wrong
for (int i = 0; i <=MainNode.Nodes.Count;i++)
{
MainNode.Nodes.Add(ChildNode);
}
} -
On button click-context menu stripThanq Dave Itz working
-
TreeViewThanq..I wil Try
-
TreeViewDid Any body got any idea
-
TreeViewThis is My data CategName subCateName Id Products NULL NULL 6 Prod3 NULL NULL 9 SalesProd7 Beverages Beers 15 Bell Lager 500 ML Beverages Beers 16 CLUB PILSENER 500 ML Beverages Juices 24 Apple Juice Beverages Juices 25 Chikooo Juice Beverages SoftDrinks 26 Coke Beverages SoftDrinks 27 Pepsi Beverages Wines 28 RED WINE Beverages Wines 29 White Wine Food MeatProducts36 GOAT MEAT Food Fruits 18 APPLE GREEN Food Fruits 19 LOCAL ORANGES Others OtherItems 30 BENSON & HEDGES LIGHT VegeTable NULL 20 BEETROOT VegeTable NULL 21 TOMATO FRESH I got the above data into Datatable 'table' and I am trying to insert into tree view as Categories-subcategories-Products. I have tried the following and my output in such a way i get only one product for each categorie and sub categorie.
if (table != null)
{
foreach (DataRow row in table.Rows)
{
MainNode = new TreeNode(row.ItemArray[0].ToString());
MainNode.Name = row.ItemArray[0].ToString();
if (MainNode.Text == "")
{
MainNode = new TreeNode(row.ItemArray[1].ToString());
MainNode.Name = row.ItemArray[1].ToString();
if (MainNode.Text == "")
{
MainNode = new TreeNode(row.ItemArray[3].ToString());
MainNode.Name = row.ItemArray[3].ToString();
MainNode.Tag = row.ItemArray[2].ToString();
if (!RootNode.Nodes.ContainsKey(MainNode.Name))
{
RootNode.Nodes.Add(MainNode);
} }
else
{
ChildNode = new TreeNode(row.ItemArray[3].ToString());
ChildNode.Name = row.ItemArray[3].ToString();
ChildNode.Tag = row.ItemArray[2].ToString();
if (!MainNode.Nodes.ContainsKey(ChildNode.Name))
{
MainNode.Nodes.Add(ChildNode);
}
if (!RootNode.Nodes.ContainsKey(MainNode.Name))
{
RootNode.Nodes.Add(MainNode);
} } }
else
{ -
On button click-context menu stripI have 30 buttons and I am trying to implement context menu on each button click by using following method.
void OnButtonClick(object sender, EventArgs e) { Button btn = (Button)sender; btn.ContextMenuStrip.Show(btn, new System.Drawing.Point(0, btn.Height)); }
I have 2 context menu strip items, Add text Label and Add colour
private void addTextLabelToolStripMenuItem_Click(object sender, EventArgs e)
{
foreach (Control item in panel2.Controls)
{
Button btn = (Button)item;
if (string.IsNullOrEmpty(btn.Text.Trim()))
{
frmAddText form = new frmAddText();
form.ShowDialog();if (frmAddText.IsTextMod) { return; } btn.Text = form.TextInfo; btn.Tag = 0; } } }
Wen i try to do this it is implementing on last button itself. Here Ia m returning Here foreach is not acceptable.
private void addColourToolStripMenuItem_Click(object sender, EventArgs e)
{
colorDialog1.ShowDialog();
DialogResult dResult = colorDialog1.ShowDialog();
foreach (Control item in panel2.Controls)
{
Button btn = (Button)item;
string strBtnName = btn.Name;
if (string.Equals(btn.Name, strBtnName, StringComparison.OrdinalIgnoreCase))
{
if (dResult == DialogResult.OK)
btn.BackColor = colorDialog1.Color;
} } }It is applying color to all buttos. But it should apply for only specific clicked button. Here foreach is not acceptable.
-
DateTimepIcker-ErrordtpFromDate & dtpTodate are DateTimepickers and a TextBox txtNoofDays
private void dtpFromDate_ValueChanged(object sender, eventArgs e)
{
double value=Convert.ToDouble(txtNoOfdays.Text);
dtpToDate.Value=dtpFromDate.Value.AddDays(value);
}Here I got the error at--> //double value ---- Input string was not in correct format How to resolve It.
-
Listview Sub item EditHi, Here I am trying to edit value in lstListView.SelectedItems[0].SubItems[3] column. The textbox I have placed is not displayed at that coulmn position. I have done with all the possibilites but unable to place the textbox in required Location. The position of textbox is not displayed in required column.
-
Listview Sub item EditHi, Can anyone trace out where is the error lstListView.DoubleClick += new EventHandler(this.lstEditDoubleClick); txtSubItem.KeyPress += new KeyPressEventHandler(this.txtEditOver); lstListView.MouseDown += new MouseEventHandler(this.lstEditMouseDown); public void lstEditMouseDown(object sender, MouseEventArgs e) { ListViewItem item = lstListView.GetItemAt(e.X, e.Y); X = e.X; Y = e.Y; } private void lstEditDoubleClick(object sender, EventArgs e) { int nStart = X; int spos = 0; int epos = lstListView.Columns[0].Width; for (int i = 0; i < lstListView.Columns.Count; i++) { spos = epos + X; epos += lstListView.Columns[3].Width; } subItemText = lstListView.SelectedItems[0].SubItems[3].Text; Rectangle r = new Rectangle(spos, lstListView.SelectedItems[0].SubItems[3].Bounds.Y, epos, lstListView.SelectedItems[0].SubItems[3].Bounds.Bottom); txtSubItem.Size = new System.Drawing.Size(epos - spos, lstListView.SelectedItems[0].SubItems[3].Bounds.Bottom - lstListView.SelectedItems[0].SubItems[3].Bounds.Top); txtSubItem.Location = new System.Drawing.Point(spos, lstListView.SelectedItems[0].SubItems[3].Bounds.Y); txtSubItem.Show(); txtSubItem.Text = subItemText; } private void txtEditOver(object sender, KeyPressEventArgs e) { if (e.KeyChar == 13) { lstListView.SelectedItems[0].SubItems[3].Text = txtSubItem.Text; txtSubItem.Hide(); } if (e.KeyChar == 27) txtSubItem.Hide(); }