|
Hey Abhijeet,
Congrats to you as well and thanks for your wish and support. Cactus is the band which I might have missed in my list but I am quite sure that Fossils is in your list right? It feels great to hear from you.
Regards
Saanj
Either you love IT or leave IT...
|
|
|
|
|
Ya.. I like both of them even many more in the list.
Keep in touch.
|
|
|
|
|
Hi....
Actually after login users can upload their resume and they can view it.
For doing this,
step1:when user is uploaded his/her resume,i saved it in server folder named "UserResumes" and at the same i took a copy of this resume and saved it as html file in same folder.
step2: I took a frame in my aspx page and given source.
like Frame["src"]="~/UserResumes/MyResume.htm"
Everything is working fine in local system.I am able to show preview of resume to users.
But the thing is when i hosted the application in EGCG serevr,it is giving following error.
Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error: 80040154.
Could you plz help me out.....................
Thanks,
ravikumar
|
|
|
|
|
Is Word on the server ? Which step creates the error ? What code is the issue, uploading, or viewing ?
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
i have problem with viewing the resume.
word file and html copy of it are getting saved in server folder successfully.And i dont think word is not on the server bocz 99% word will be thre on server
|
|
|
|
|
Hi. Im using GoDaddy shared hosting and when I run my application(which works fine locally) I get the following error: "System.Security.SecurityException: Request for tyhe permission of type "System.Security.Permission.FileIOPermission etc etc failed".
The weird thing is that I am not using any IO at all, and even if I was I have contacted support before to allow it for another application(which still works fine and can write. I also tried enabling write permissions on the directory and it didnt help.
I went through my web.config file commenting out section by section and after counting out everything else it seems to be this that is causing the problem:
<.authentication mode="Forms"><br />
<.forms loginUrl="login.aspx"><./forms><br />
<./authentication><br />
<.membership defaultProvider="SqlProvider"><br />
<.providers><br />
<.add name="SqlProvider" (then my sql connection string) /><br />
<./providers>
I have also tried on a different web host and I also get an error(although I cant seem to get the details even when custom errors = no and debug=true).
Thanks :-/
p.s. sorry for the .'s above, nothing seems to be working for me today :-/
|
|
|
|
|
GoDaddy utterly, utterly sucks. Change providers if you can.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
As I said, I have tried another host aswell.
|
|
|
|
|
Hi All,
I am in new in ASP.NET.
anybody give me simple example that how do I create PDF file in asp.net.
|
|
|
|
|
vnsraj wrote: anybody give me simple example that how do I create PDF file in asp.net.
Sure. Have a Look
|
|
|
|
|
I think the most easiest one is to use reports to generate PDF files in ASP.NET. Just create rdlc reports and export it to PDF if you wish...
iTextSharp is also an option. Look into this if you want to do this using iTextSharp.
http://www.codeproject.com/KB/aspnet/Creating_PDF_documents_in.aspx
|
|
|
|
|
HI, i am quite frustrated trying to retrieve values from nested web control inside a composite control .
I have stripped the control(s) down to barebones to try to make this explanation as easy as possible. if anyone can help me out it would be greatly appreciated!!
(This code exists entirely in codebehind, nothing exists in the aspx pages)
In my aspx.cs page i declare a composite(Parent) control. Within this Parent control is a public property that is an IList of 'ChildControl's.
The 'ChildControl' is just 2 texboxes. When a user clicks a button in the Parent control, i add a new 'ChildControl' to the 'ChildControlList' property of the composite (Parent), and render it. Seems pretty basic.
When user clicks on btnGetValues (Button) in the aspx page, i want to grab all the values of the TextBoxes in the ParentControls 'ChildControlList' property.
From the dozens of forums that I've read on this, it appears i need to add the controls in the OnInit Property instead of the CreateChildControls property to ensure Viewstate. I've tried both but neither have worked.
When I click on the 'Add Child Control' button for the first time, everything looks fine, and 2 new textboxes are rendered. However, if I enter text into those textboxes, and try to retrieve the values, the ChildControl list is always emtpy. (or if I try to add additional childcontrols to the page, the ChildCOntrolList Count is always 0, so never get more than 1 item in the ChildCOntrolList.)
please help me.
Below is the relevant code:
ASPX.CS
public partial class _Default : System.Web.UI.Page
{
private ParentWebControl parentControl;
private Button btnGetValues;
protected void Page_Load(object sender, EventArgs e)
{ }
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
HtmlForm form = (HtmlForm)Page.FindControl("form1");
btnGetValues = new Button();
btnGetValues.Text = "Get values (aspx)";
parentControl = new ParentWebControl();
btnGetValues.ID = "btnGetValues";
parentControl.ID = "parentCompositeControl";
btnGetValues.Click += btnGetValues_Click;
form.Controls.Add(btnGetValues);
form.Controls.Add(parentControl);
}
void btnGetValues_Click(object sender, EventArgs args)
{
List <ChildControl> subChildren = parentControl.ChildControlList;
foreach (ChildControl child in subChildren)
{
string value1 = child.TextBox1.Text;
string value2 = child.TextBox2.Text;
}
}
}
PARENT CONTROL:
public class ParentWebControl : CompositeControl
{
private Button addChildControl;
private Label label;
private List<ChildControl> childControlList;
public ParentWebControl()
{
if(childControlList==null)
childControlList = new List<ChildControl>();
}
public List<ChildControl> ChildControlList
{
get
{
EnsureChildControls();
return childControlList;
}
set
{
EnsureChildControls();
childControlList = value;
}
}
private void addChildControl_Click(object source, EventArgs e)
{
ChildControl newChild = new ChildControl();
newChild.ID = "newChild";
childControlList.Add(newChild);
}
protected override void OnInit(EventArgs e)
{
addChildControl = new Button();
addChildControl.ID = "addChildControl";
addChildControl.Click += addChildControl_Click;
addChildControl.Text = "Add Child Control";
label = new Label();
label.ID = "myLabel";
label.Text = "some label";
Controls.Add(addChildControl);
int id = 0;
foreach (ChildControl control in ChildControlList)
{
control.ID = "childMemberControl" + id++;
Controls.Add(control);
}
Controls.Add(label);
base.OnInit(e);
}
protected override void Render(HtmlTextWriter writer)
{
writer.RenderBeginTag(HtmlTextWriterTag.Div);
addChildControl.RenderControl(writer);
foreach (ChildControl control in ChildControlList)
{
control.RenderControl(writer);
}
label.RenderControl(writer);
writer.RenderEndTag();
}
}
CHILDCONTROL:
public class ChildControl : WebControl
{
private TextBox textBox1;
private TextBox textbox2;
public TextBox TextBox1
{
get
{
EnsureChildControls();
return textBox1;
}
set
{
EnsureChildControls();
textBox1 = value;
}
}
public TextBox TextBox2
{
get
{
EnsureChildControls();
return textbox2;
}
set
{
EnsureChildControls();
textbox2 = value;
}
}
public ChildControl()
{
TextBox1 = new TextBox();
TextBox2 = new TextBox();
}
protected override void OnInit(EventArgs e)
{
TextBox1 = new TextBox();
TextBox1.ID = "textBox1";
TextBox2 = new TextBox();
TextBox2.ID = "textBox2";
Controls.Add(TextBox1);
Controls.Add(TextBox2);
base.OnInit(e);
}
protected override void Render(HtmlTextWriter writer)
{
writer.RenderBeginTag(HtmlTextWriterTag.Div);
TextBox1.RenderControl(writer);
TextBox2.RenderControl(writer);
writer.RenderEndTag();
}
}
----------
Can anyone please set me in the right direction, i have spent almost a whole day on trying to achieve this.
Thanks so much!!
dwfresh
|
|
|
|
|
Viewstate in dynamically created controls is always a nightmare. The easiest way to handle it, is to write some JS that writes to a hidden control, with the text of the textboxes, and then you recreate them from there. The hidden control is always defined, so there are no viewstate issues.
Failing that, I wonder why you're creating your own 'child control list'. Why not just iterate over the controls collection that you're adding to, the one that already exists ? You can create a list that iterates over the controls list and only returns controls of a particular type. I bet if you set breakpoints, your problem is with the order of operations, and that childcontrollist getting set to empty.
Christian Graus
Driven to the arms of OSX by Vista.
Please read this[ ^] if you don't like the answer I gave to your question.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
|
|
|
|
|
Christian Graus wrote: Viewstate in dynamically created controls is always a nightmare. The easiest way to handle it, is to write some JS that writes to a hidden control, with the text of the textboxes, and then you recreate them from there. The hidden control is always defined, so there are no viewstate issues.
|
|
|
|
|
thanks so much for the reply, and i will post this in a new thread as well.
so my next question is.
Can you give me a quick example of how to do this? Take the text from an asp.net control and adding it to a hidden field via javascript?
that would help me a lot!!
Thanks.
|
|
|
|
|
What is the best way to check for a record exists in a database using linq to sql?
I want to check if a userid (int) and typeid (int) exist. - The following code always returns zero even if the record exists - what is the best approach?
int result = 0
result = (from t in context.customers
where ((t.userid == intUserID) && (t.typeid == intTypeID))
select t).Count();
|
|
|
|
|
Why do you need Linq to SQL for such a basic task ?
This is what I feared, new tools are being forced like square pegs into round holes by people with no idea. And, this is a SQL question. A very basic one, at that.
Christian Graus
Driven to the arms of OSX by Vista.
Please read this[ ^] if you don't like the answer I gave to your question.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
|
|
|
|
|
I am having a pretty weird problems with my custom web controls. basically to start it all, I have a custom web user control, written in C# as a Class inherit as User Control. What it does is like a bread crumbs approach control, if you guys are familiar. I am using a modal pop up extender, a grid pops up then with a separate data pager, when the grid fires selectedIndexchange event then just basically append a dynamic link button into the placeholder with added event onclick to basically just remove it self from the placeholder if clicked.
now my problems are.
1. when I get to the last item in the place holder, the onclick event won't fire, it hides itself from the users view, and shows itself back when another link button is added into the placeholder and that's not all, in debug mode there is no event that can capture all those what's happening in that linkbutton when i clicked it, it just hides and yes even javascript on click event can't capture it.
2. datapager in the pop up goes haywire when i click the next button, it hides.
I am aware that this might be a problem on how I render the control, but even if I tried this approach in an actual web page and not as a usercontrol I still get the same problems aside from the datapager.
I am not trying to find a solution cause this is a really hard problem believe me, if there is then I would welcome it. I just wanted to know if anyone has the same experience? thanks.
|
|
|
|
|
I have an editable gridview with blank cells. User enters some numeric data in cells & clicks a button. My problem is that, as soon as button click event is fired, the page refreshes & the gridview becomes empty. Can anybody tell me, how can I save values in cache so that button click event does not result in loss of data. ?
|
|
|
|
|
Surely the point of the button is to store the values ? Where do the values get stored in general ? I'd expect the button to store the values in the DB and then the control to rebind to the data source.
Christian Graus
Driven to the arms of OSX by Vista.
Please read this[ ^] if you don't like the answer I gave to your question.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
|
|
|
|
|
my database Ms Access has 3 fields as folllows;
id- number
imageName- text
imageURL- text
...................................................
I have a fileupload tool and a button names btnUpload which helps to upload images to a folder and that path gets saved in database field names imageURL.
.........................................................
Inherits System.Web.UI.Page
Dim constr As String = "Provider=Microsoft.jet.OLEDB.4.0; Data Source=D:\imgupload\db1.mdb;Persist Security Info=False;"
Protected Sub btnUpload_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnUpload.Click
If FileUpload1.HasFile Then
FileUpload1.SaveAs(IO.Path.Combine(Server.MapPath("Image"), FileUpload1.FileName))
fnSaveFile(IO.Path.GetFileName(FileUpload1.FileName), IO.Path.Combine(Server.MapPath("Image"), FileUpload1.FileName))
End If
End Sub
Public Sub fnSaveFile(ByVal FileName As String, ByVal FileURL As String)
Dim cmd As New OleDb.OleDbCommand
Dim con As New OleDb.OleDbConnection(constr)
Try
Dim strSql As String = "insert into tbl_Image(ImageName,ImageURL) values('" & FileName & "','" & FileURL & "')"
'------------"
con.Open()
cmd.Connection = con
cmd.CommandText = strSql
cmd.ExecuteNonQuery()
Catch ex As Exception
Response.Write(ex.Message)
Finally
cmd.Dispose()
con.Dispose()
End Try
End Sub
................................................................
my image uploading is working well. cud anyone sugesst me a way to add a gridview and show the image other than showing the path of the image.
|
|
|
|
|
Did you gone through the all the reply that was provided to you in your last post?
|
|
|
|
|
ya but I didnt understand or get any idea to change those to my requirement. plz help me
|
|
|
|
|
Pratheepa wrote: ya but I didnt understand or get any idea to change those to my requirement. plz help me
Well, posting the same question again, will get you the same answers. The problem is that you're not capable of doing this task. If this is homework, talk to your teacher. If this is paid work, tell your client that you are a fraud now, and save you and them further time and hassle. We answered you. If you can't understand it, that's not our fault.
Christian Graus
Driven to the arms of OSX by Vista.
Please read this[ ^] if you don't like the answer I gave to your question.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
|
|
|
|
|
Pratheepa wrote: ya but I didnt understand or get any idea to change those to my requirement.
|
|
|
|