|
what is the solution of this problem
|
|
|
|
|
Grant the necessary permissions on the applicable folders.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
i have a two dimensional array of string[,] i want to convert or fill it into the dataset or datatable
and also i need to fill with null value also
iam unable to do this
i tyed this
dataset.Tables.Add(Original_Table); //error says string[*,*] cannot be converted to datatable
Please help me.
Bharani
|
|
|
|
|
You need to create a datatable and add your data to it, you cannot cast an array to a datatable. If you want to allow nulls in the columns you will have to decalre them as nullable too.
This should get you started
dt = new DataTable();
dt.Columns.Add(new DataColumn("x", typeof(String)));
DataRow dumRow = dt.NewRow();
dumRow[0] = "All";
dt.Rows.Add(dumRow);
Bob
Ashfield Consultants Ltd
|
|
|
|
|
well I don't know about casting, as per previous answer, but you can certainly bind an array to a datatable... clickety[^]
|
|
|
|
|
I have a datalist that there is a picture control in it.name of the picture is in database and the picture in a folder on server. how can I change the size of picture that I show in datalist?
|
|
|
|
|
Can you not set the width of the columns of the datalist?
Or once you get the picture you can then convert to image type and edit the dimensions that way.
I think though not 100% sure
|
|
|
|
|
hi! guys this is terrible since a while now i've trying to do a very basic data binding, but i'm failing somewhere.let say in my webpage i have a dropdownlist and a textbox(textArea).so the logic is when a user select a text on the dropdownlist(ddCustom by id) its value should be displayed in the textbox.that it.what i've achieved so far is having the dropdownlist text bound but the value is not loading into the textbox field.
here are my codes
<code>
protected void Page_Load(object sender, EventArgs e)
{
if (IsPostBack)
{
string result = this.validateAll(txtEmail.Text, txtNumbers.Text, txtMessage.Text, txtName.Text, 100);
int resultlen = result.Length;
lblError.Text = resultlen.ToString();
}
else
{
DataSet DsTemplate = new DataSet();
DsTemplate.ReadXml(MapPath(@"~\misc\MessageTemplate.xml"));
ddCustom.DataSource = DsTemplate;
ddCustom.DataTextField = "name";
ddCustom.DataValueField = "text";
ddCustom.DataBind();
}
}
protected void ddCustom_SelectedIndexChanged(object sender, EventArgs e)
{
//txtMessage is the id of the textbox
txtMessage.Text = ddCustom.SelectedItem.value;
}
</code>
sample of the xml file
<?xml version="1.0" encoding="utf-8" ?>
<templates>
<template>
<name>Custom</name>
<text></text>
</template>
<template>
<name>Please call</name>
<text> i'm having a Problem Please call me back at</text>
</template>
<template>
<name>Meeting</name>
<text> the meeting is reported</text>
</template>
<template>
<name>BitrhDay</name>
<text> Happy birth Day</text>
</template>
</templates>
simple isn't it? but don't know.
I'm from php backgroung.i would do that by an ajax stuff or with jquery.But here i'm surely forgetting something or thinking that asp.net would do everything for me.i search on google, w3school and my codes seems to be ok.need help on this.please let me know as soon as you have time to check this.Thank you!
PS:i'm so frustrated i can't do anything else<code></code>
eager to learn
<div class="ForumMod">modified on Friday, July 11, 2008 7:39 AM</div>
|
|
|
|
|
common guys a little help to put me on track please.still waiting
eager to learn
|
|
|
|
|
Add this at the end of Page_Load
ddCustom.Attributes.Add(
"onchange",
"var txtMessage = getElementById('" + txtMessage.ClientID + "');"+
"if(txtMessage)txtMessage.value = this.options[this.selectedIndex].value"
);
This will run on client side.
Your code should also work, but you didn't give us the html from the ASP.NET page.
So... I suppose you did not assign the OnSelectedIndexChanged="ddCustom_SelectedIndexChanged" for your ddCustom <asp:dropdownlist ...="" xmlns:asp="#unknown"> control.
|
|
|
|
|
Pretty pretty cool man it's working without any modification.just copy and paste.You are the man!
thanks.
disturbingly simple.By the way why do you select txtMessage.ClientID instead of txtMessage what i would be tempted to do?
eager to learn
|
|
|
|
|
Because you didn't tell me enough about your application and I wanted to make the code working with just a copy/paste.
Seriously now, if your dropdownlist control is placed inside a repeater or it's a part of a user control (or whatever...) , then the ClientID and ID are different.
|
|
|
|
|
got ya! thanks bro!
eager to learn
|
|
|
|
|
Make sure that for the drop down list "AutoPostback=True is" ther.;
<asp:dropdownlist id="ddCustom" runat="server" autopostback="True" onselectedindexchanged="DropDownList1_SelectedIndexChanged" xmlns:asp="#unknown">;
</asp:dropdownlist>
Thanks,
Arindam D Tewary
|
|
|
|
|
ok bro it's already there. thanks for helping
eager to learn
|
|
|
|
|
How can i upload a file of size 10 gb through .net web application. The working would be similar to the Uploader control which is available with .net fromework.
Remember I need an Web Application to upload a single file of 10-15 Gb. Can anyone help me out from this.
Thanks & Regards
Arunangshu Sarkar
Sr. Software Developer
|
|
|
|
|
Have you tried to use FileUpload control?
Best Regards,
Sam Xavier
www.componentone.com
|
|
|
|
|
Yea I have tried File Uploader Control. But it can upload only upto 2Gb of file size. not more than that
Thanks & Regards
Arunangshu Sarkar
Sr. Software Developer
|
|
|
|
|
I'm happy to throw my 2c in, but what is your actual usage scenario here?
|
|
|
|
|
my seanerio is to upload a video file which will have size of nearly 10 Gb. I tried with Upload Control but once it becomes more than 2GB the server fails.
Thanks & Regards
Arunangshu Sarkar
Sr. Software Developer
|
|
|
|
|
I would suggest you use an FTP class instead to transfer the file. ASP.NET 2.0+ has it's own FTP classes, and there are others freely available for 1.1 via Google..
|
|
|
|
|
|
ArunangshuSarkar wrote: can i upload a file of size 10 gb through .net web application
Wow, that sounds rather excessive
You may want to find a way to upload it in 2GB chunks and have the server side repiece those chunks when done. Consider if you are 4.5GB into the upload and something happens, at least you have the chunks there, so you don't have to re-upload the whole file.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Hi,
I want to disply my redirected web page url with query string in status bar instead of address bar. What I have to do? Pls help
Tnx in adv.
Balasubramanian K.
|
|
|
|
|
In body tag client side onload event write the following code
window.status = '<%=Request.Url %>';
This will work for you.
|
|
|
|