|
Hi,
You should investigate methods of storing / retrieving your database images as Binary Large Object (BLOB) data. Check out the below for which should help:
http://support.microsoft.com/kb/258038
Clean code is the key to happiness.
|
|
|
|
|
I enter user details like name,address etc.I want to display these details in a table.But when i display it the address not come in proper way.How can i display the address in proper way.
For entering i used textbox with multiline property.
|
|
|
|
|
Is there any problem in using the TextBox control to display the address by setting the MultiLine and Read-Only property to True or by setting the enabled property to false?
If you wanted to display multi-line text in a lable control, then you can add Environment.NewLine at the end of each line. I hope this solves your problem.
- Regards - J O N
A good thing is a bad thing if it keeps you from the best thing. - Dr. Adrian Rogers
|
|
|
|
|
Check the html that ASP.Net emits. Even though the people input "foo {newline} bar {newline} err", and that gets saved to the database, you will need to replace the newline characters with the BR tag. Your html will have new line characters in it, but they will be ignored by the browser.
|
|
|
|
|
I want to open a Word doc on aspx page. Even though at temporary location. There is a tool which will convert the Word to XML and we can post it back to server. So my primary requirement is to load and make any changes to it from ASPX page.
What will be the approach or can some one tell me the code to perform the task. I know there are libraries available for MS Word. We can create word files but I am not sure how can we edit them after loading on ASPX page.
I tried using IFRAME. The word doc opens in a new window out side the application. I want it to open the word file in a ASPX page
Regards,
Pavas
|
|
|
|
|
hi mpavas,
Few days ago i also faced the same problem. My problem is that i want to embed Resume documents(doc) to aspx page. It works but there is no formatting, no indentation of letters.
So, to achieve this you need to save your documents as Single Web Page in Save As Typeof Save As dialog Box. You can see this in MS-Word 2003. But you should do this programatically. Your document can easily embed into Iframe of Html tag. Believe me it works without changing formatting of word document.
Hope this will help you.
Thanks & Regards
Dilip Kumar Vishwakarma
|
|
|
|
|
right now I'm working on live project.
how can I restart windows service through web application
or
how can I set timer for windows service.
thanks.
You get the best out of others when you give the best of yourself.
|
|
|
|
|
hi,
let's see
public partial class _Default : System.Web.UI.Page<br />
{<br />
protected int j;<br />
<br />
protected void Page_Load(object sender, EventArgs e)<br />
{<br />
TextBox4.Text = "" + ViewState["count"];<br />
<br />
<br />
<br />
}
protected void Button3_Click(object sender, EventArgs e)<br />
{<br />
<br />
if (ViewState["conut"] == null)<br />
{<br />
j = 1;<br />
<br />
}<br />
else<br />
{ j = (int)ViewState["count"] + 1; }<br />
ViewState["count"] = j;<br />
<br />
<br />
<br />
}}
when click on Button3, then textbox show "1"...even on every click......how i can store the value of int j so that textbox could show the incremented value of j variable ? .........
|
|
|
|
|
You should learn to use const s
What's the difference?
ViewState["conut"]
ViewState["count"]
If you spell things properly, it works better. If you use const s to store the names of things in your viewstate the compiler will tell you when you mistype stuff so you can see where you are going wrong quicker.
|
|
|
|
|
Try with this.No need of global variable.
protected void Button1_Click(object sender, EventArgs e)<br />
{<br />
if (ViewState["Count"] == null)<br />
ViewState["Count"] = 0;<br />
int newCount = (int)ViewState["Count"] + 1;<br />
ViewState["Count"] = newCount;<br />
txtCount.Text = newCount.ToString();<br />
}
Arun J
|
|
|
|
|
But there is a problem .->ON every click , ViewState["Count" ] start with null value,i wnat textbox display the number of clicks....but it remain shows "1".........
|
|
|
|
|
Did u try with that code i posted?It'll work fine.Viewstate can't be null from the second click onwards.Just copy and paste that code and Check again...It'll work..
Arun J
|
|
|
|
|
Yes...i used your methode....but there still problem.......ok i try again
thanks
|
|
|
|
|
Just Debug the application and see what is stored in the viewstate when post back occures
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
zeeShan anSari wrote: else
{ j = (int)ViewState["count"] + 1; }
ViewState["count"] = j;
}}
try the below logic...
protected int J = 0;
protected void Page_Load(object sender, System.EventArgs e)
{
if (!Page.IsPostBack)
else
J = Viewstate["Count"];
}
protected void Page_PreRender(object sender, System.EventArgs e)
{
ViewState["Count"] = J;
}
protected void Button1_Click(object sender, System.EventArgs e)
{
J = J + 1;
TxtBox.Text = J;
}
- Regards - J O N
A good thing is a bad thing if it keeps you from the best thing. - Dr. Adrian Rogers
|
|
|
|
|
private int Foo
{
get { return ViewState["Foo"] as int? ?? 0; }
set { ViewState["Foo"] = value;
}
Then go play with your Foo.
|
|
|
|
|
yes!..I get the solution......which are as:
public partial class _Default : System.Web.UI.Page<br />
{<br />
protected int j=0;<br />
<br />
protected void Page_Load(object sender, EventArgs e)<br />
{<br />
<br />
<br />
if (!IsPostBack)<br />
{<br />
ViewState["count"] = 0;<br />
<br />
}<br />
<br />
}
protected void Button3_Click(object sender, EventArgs e)<br />
{<br />
<br />
<br />
<br />
j =(int) ViewState["count"];<br />
j = j + 1;<br />
TextBox4.Text = "" + j;<br />
ViewState["count"] = j;<br />
<br />
}<br />
}
|
|
|
|
|
Hi,
I have a cookie generated in the JavaScript(using document.cookie). How can i access this in the cs page. Request.Cookies[CookieName] does not work.
Regards,
Rahul Babu
|
|
|
|
|
Hii,
Could any one please tell me how to insert values from dynamic text boxes using C# code.
Actually i have to create more and more dynamic text boxes whenever a user clicks on more button, and also i want to fetch the values from these text boxes and store it into the database. Could any one please tell me how i will do this.
Actually until and unless form will not get loaded the controls will not be created at run time, then how i will get the id of the text boxes so that i can write the code.
Any help will be appreciated.
Thanks
Imran
|
|
|
|
|
Think on this might be helpfull
Create a user control with all texboxes that you have to add at runtime.
Now the user control should contains one property/method that will accept a object. These object is nothing but the class object that you are going to store in session.Every time you will have to update session and UI Fields
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
ASP.NET won't maintain viewstate for the controls created after viewstate load event has been fired. You can use DataGrid/GridView to do this. Put your controls inside a template column and add each row to the DataGrid when button is pressed. Use FindControl() to find the control from grid.
|
|
|
|
|
Create the dynamic control on the Page Init event, so that the control will participate in the Viewstate. You will be able to read the contents as you normally do with static texboxes. This article may help you through...Dynamic Controls[^]
- Regards - J O N
A good thing is a bad thing if it keeps you from the best thing. - Dr. Adrian Rogers
|
|
|
|
|
Am suggesting a simple way.Declare a static variable count in the page.While creating textbox give the ID of the textbox as count+1;
when u need the data for saving,iterate through for loop by using the count variable and find the control using this count as ID.
Arun J
|
|
|
|
|
Creating a static variable will give problem nothing than else
what for another user ? this count is going to be share by them also
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
If static variable will cause problem,then just use viewstate.It'll work fine.
Arun J
|
|
|
|