|
thanks........Is it possible in javascript?
|
|
|
|
|
No, JavaScript doesn't support file operations. Secondly JavaScript resides on client and this is something that needs server side processing as the code I provided will be used in ASP.NET(C#)
|
|
|
|
|
zeeShan anSari wrote: .Is it possible in javascript?
No its not possible using JAVAScript. I guess your files is in the server. Then you need to write the server side code for this.
If the file are in client, JAVAScript does not have the sufficient permission to read the client system file. If you really need it you can go with ActiveX, but it will only on IE.
|
|
|
|
|
what you are looking for?Whether you have to read all the files of a folder from server machine or client machine?
if on client machine,you cant read from javascript.Javascript doesn't have that much access rights to read system folders at client system
Cheers!!
Brij
|
|
|
|
|
Dear All,
I am designing a web site. On which I will be presenting different products dynamicly. Promotions will be moved to first page and etc. I came up with the following Idea.
1. I will create a datagrid view.
2. A database will keep the paths of the pictures.
3. The datagrid will be filled with this database.
I want to ensure that the pictures are displayed in a standart size. Is it possible that the software convert the image to the standart size whatever the orginal size is?
I really appreciate the option with and without stretching.
Moreover, could you please let me know the easist way of displaying products from left to right as at the following page:
hepsiburada
Did they use datagrid.
Thanks alot in advance
|
|
|
|
|
Resize option is more specific to upload. I suggest you shouldn't resize and save images back at display level. If you want your application to have some functionality to resize the images then enforce it when uploading the pictures. Yes of course you can control image size via using height and width at display level.
Regarding your posted URL I think they are making use of Data List control by setting its columns property to 3. You can use data list control for a similar display all you need is to set its columns property to 3 and then in its item template put table HTML to format the product description like.
<table><tr><td>Name</code></td></tr>
<tr><td>Description</code></td></tr>
<tr><td>Price</td></tr></table>
|
|
|
|
|
Thanks for the answer however I have one more.
when you get the data from database to fill data list, how will you define which image will go to left, which to right, etc?
|
|
|
|
|
Why one will need to keep track in database that image will go to left or right. If we talk about modern E commerce systems normally each product have a thumbnail URL that points to an image of thumbnail size idle for category or product listing pages like yours. When developing a listing page you will decide that whether to put image on left or right and then format table HTML to meet that need.
|
|
|
|
|
Are you saying that the display will be left to right then from up to down. As far as I know in the data-list all columns has different data-set element. bu here it will be only image path.
|
|
|
|
|
Hi All,
I have tried to installed mono on windows xp platform. I have take this url as reference but not able to understand the terminology of this document. Actually i am totally MST (Microsoft technology) experience person and that terminology in some apache or else.
Can any one help me to install / configure Mono on windows XP.
Regards
Manish
|
|
|
|
|
Member 2650453 wrote: I have tried to installed mono on windows xp platform
Is it related to ASP.Net? I guess NO.
Member 2650453 wrote: I have take this url as reference
Which url?
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Hi ,
Hoe to display image in asp:Image ID ="Image1" control image is coming as bytes
Thanks ,
Amit Patel
|
|
|
|
|
For this you need to make use of Bitmap class. First create a bitmap object and then process streamed data to create a bitmap image. For this search any topic that help you about creating bitmap images using .Net and finally all you need is to call save on this bitmap image providing it the response stream and image type like
bitmap.Save(Response.OutputStream, ImageFormat.Jpeg);
Hopefully it will help
cheers!
|
|
|
|
|
try this one[^] pass your byte[] in the function and you will get a image that you can use.
|
|
|
|
|
hi all,
i m creating a folder in ftp but it is giving error that "access denied
to path <path>"
can anybdy tell me how can i do this ?
Thanks in Advance.
|
|
|
|
|
I guess you don't have the right to create a folder at the ftp-server. You may ask the admin...
|
|
|
|
|
Do you have required rights to create the folder.
Cheers!!
Brij
|
|
|
|
|
Dhrumil_Shukla wrote: i m creating a folder in ftp but it is giving error that "access denied
to path "
As you are doing it from a ASP.NET web application, you need to know about some certain things.If you are trying it in VS Studio, then you need to write access to the ftp folder only. If your application hosted on server, then you need to give right access to that folder for every one to write OR need to create separate application pool with "Local System" Identity.
Regards,
Abhijit
|
|
|
|
|
You ought to ensure that right privileges are possessed by the logged on client.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
The woods are lovely, dark and deep,
But I have promises to keep,
And miles to go before I sleep,
And miles to go before I sleep!
|
|
|
|
|
If your userid have only readonly rights, you cant create folder or upload files to the FTP site with that particular user.
Ask your admin who can configure the FTP to give you proper rights.
|
|
|
|
|
Hi Friends,
My reuirement is need to generate text boxes dynamically on the selection of drop down list where the drop down list
contains no and on selection of drop down list i need to create text boxes . i am able
create text box dynamically but when i select the drop down list whole page refreshes and
displays the text boxes . but what i need is the page should not refresh and the text boxes
should be displayed on selection of drop down .I have added update panel when i add these after selection
of drop down the page hangs up and no dynmic contols are created . and if i comment the update panels i am able
to get the text boxes .
Please help me to solve this problem
My id : jrsreenivas@hotmail.com
aspx.code
------------
<form id="form1" runat="server">
<asp:ScriptManager ID="smRedemption" runat="server" EnablePartialRendering="true"></asp:ScriptManager>
<div>
<asp:UpdatePanel ID="upRedemption" runat="server" >
<ContentTemplate>
<asp:Panel ID="pnlRedemption" runat="server">
<table>
<tr>
<td>
<asp:DropDownList ID="ddlAdoption" runat="server" OnLoad="ddlAdoption_Load" OnSelectedIndexChanged="ddlAdoption_OnSelectedIndexChanged" AutoPostBack="true" >
</asp:DropDownList>
<asp:Label ID="lblCount" runat="server" Visible="false" ></asp:Label>
</td>
</tr>
<tr id="trAdoptionNo" runat="server" visible="false" >
<td>
<asp:Label ID="lblMessage" runat="server" Visible="false" ForeColor="Red"></asp:Label>
</td>
</tr>
</table>
</asp:Panel>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel ID="upDisplay" runat="server" UpdateMode="Conditional" >
<ContentTemplate>
<asp:Panel ID="pnlDisplay" runat="server">
<table>
<tr>
<td>
<asp:PlaceHolder ID="phAdoption" runat="server" Visible="true" EnableViewState="true" ></asp:PlaceHolder>
</td>
</tr>
<tr>
<td>
<asp:LinkButton ID="lnkRedemption" runat="server" Text="Next" onclick="lnkRedemption_Click" Visible="false" ></asp:LinkButton>
</td>
</tr>
</table>
</asp:Panel>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="ddlAdoption" />
</Triggers>
</asp:UpdatePanel>
</div>
</form>
c# code
----------------
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
ddlAdoption.Items.Insert(0, new ListItem("--Select--", "0"));
}
}
protected void ddlAdoption_OnSelectedIndexChanged(object sender, EventArgs e)
{
lblCount.Text = ddlAdoption.SelectedValue;
int adoptionCount = Convert.ToInt32(lblCount.Text);
for (int i = 0; i < adoptionCount; i++)
{
TextBox txtAdoptionNo = new TextBox();
Label lblBreak = new Label();
lblBreak.Text = "<br/>";
txtAdoptionNo.ID = "txtAdoptionNo" + i;
RequiredFieldValidator rfvAdoptionNo = new RequiredFieldValidator();
rfvAdoptionNo.ID = "rfvAdoptionNo"+i;
rfvAdoptionNo.ControlToValidate = txtAdoptionNo.ID;
rfvAdoptionNo.ErrorMessage = "Cannot be Empty";
phAdoption.Controls.Add(txtAdoptionNo);
phAdoption.Controls.Add(rfvAdoptionNo);
phAdoption.Controls.Add(lblBreak);
}
lnkRedemption.Visible = true;
}
protected void ddlAdoption_Load(object sender, EventArgs e)
{
for (int i = 1; i < 10000; i++)
{
ddlAdoption.Items.Add(new ListItem(i.ToString()));
}
}
|
|
|
|
|
jrsreenivas wrote: My reuirement is need to generate text boxes dynamically on the selection of drop down list where the drop down list
contains no and on selection of drop down list i need to create text boxes .
jrsreenivas wrote: protected void ddlAdoption_OnSelectedIndexChanged(object sender, EventArgs e)
{
lblCount.Text = ddlAdoption.SelectedValue;
int adoptionCount = Convert.ToInt32(lblCount.Text);
for (int i = 0; i < adoptionCount; i++)
{
TextBox txtAdoptionNo = new TextBox();
This is not the way how ASP.NET Works. Just back to the APS.NET Page life cycle, All Postback Data and ViewState Data Loads Just Before Page_Load() Event. Now If you are creating Textbox in Dropdown list selected index changed, the Textbox will be created, but it will not able to load the Postback and View State Data. So this will not help you at all. You have to create the textbox on Pre_Init() Event, so that It can load the ViewState and Postback data.
|
|
|
|
|
hi Abijit,
thanks for your response can you please let me know the code how to write pre_init() so that it works for me .
thanks in advance
sreenivas
|
|
|
|
|
jrsreenivas wrote: can you please let me know the code how to write pre_init()
Hi Try this,
protected void Page_PreInit(object sender, EventArgs e)
{
if (Page.IsPostBack)
{
string s = Request.Form["DropDownList1"];
}
}
Hope this will help you
|
|
|
|
|
I think creating dynamic textboxes will be easier if you use javascript. Use
var input = document.createElement('input');
input.type='text';
var container = document.getElementById('yourcontainerdiv');
container.appendChild(input);
Likewise create no of textboxes to the container div.
By this way you can omit the unnecessary server call.
|
|
|
|