|
hey thnx for your reply..actually my task is described below in detail..
Below is my databse table..
I can populate this data into the UI Page..
My task is to automatically delete the columns which has '0'(zero) value...and i have to delete the first row of my table...
Hear i am not going to use any itemtemplate column..
I have to write some code in codebehind..
JurisdictionID JurisdictionDescription Year1 Year2 Year3 Year4 Year5 Year6 Year7
2005 2006 2009 0 0 0 0
AL Alabama 0 0 6 0 0 0 0
AK Alaska 2 0 0 0 0 0 0
Could Anyone suggest me ..How to proceed further in detail with some code...:
modified on Monday, June 1, 2009 1:04 PM
|
|
|
|
|
Im looking to display xml values via a datagrid. And so far Ive had luck with everything, except nested values.
<?xml version="1.0" encoding="UTF-8"?>
<Collection>
<Content>
<ID>16938</ID>
<Type>Content</Type>
<Title>Smartform2</Title>
<QuickLink>/it.aspx?id=16938</QuickLink>
<Teaser>
<p>SmartForm1Smartform2Smartform3Smartform4</p>
</Teaser>
<Html>
<root>
<Field1>
<Field2>
<Test1>SmartForm1</Test1>
<Test2>Smartform2</Test2>
</Field2>
<Field2>
<Test1>Smartform3</Test1>
<Test2>Smartform4</Test2>
</Field2>
</Field1>
</root>
</Html>
<StartDate>1/1/0001 12:00:00 AM</StartDate>
<DateModified>5/28/2009 3:02:59 PM</DateModified>
<DateCreated>5/28/2009 3:02:49 PM</DateCreated>
<EndDate>12/31/9999 11:59:59 PM</EndDate>
<LastEditorFname>Erik</LastEditorFname>
<LastEditorLname>Kozlowski</LastEditorLname>
<Hyperlink>
<a href="/it.aspx?id=16938">Smartform2</a>
</Hyperlink>
<DisplayStartDate/>
<FolderID>2594</FolderID>
<ContentStatus>A</ContentStatus>
<Language>1033</Language>
<DisplayDateModified>5/28/2009</DisplayDateModified>
<DisplayDateCreated>5/28/2009</DisplayDateCreated>
<DisplayEndDate/>
<EndDateAction>Archive_Expire</EndDateAction>
<Comment/>
<Image>/WorkArea/images/application/spacer.gif</Image>
<ImageThumbnail>/WorkArea/images/application/thumb_spacer.png</ImageThumbnail>
<FilePath>/it.aspx?id=16938</FilePath>
</Content>
<Content>
<ID>16936</ID>
<Type>Content</Type>
<Title>Test smartform 1</Title>
<QuickLink>/it.aspx?id=16936</QuickLink>
<Teaser>
<p>Smart1Smart2Smart3Smart4</p>
</Teaser>
<Html>
<root>
<Field1>
<Field2>
<Test1>Smart1</Test1>
<Test2>Smart2</Test2>
</Field2>
<Field2>
<Test1>Smart3</Test1>
<Test2>Smart4</Test2>
</Field2>
</Field1>
</root>
</Html>
<StartDate>1/1/0001 12:00:00 AM</StartDate>
<DateModified>5/28/2009 3:00:24 PM</DateModified>
<DateCreated>5/28/2009 3:00:18 PM</DateCreated>
<EndDate>12/31/9999 11:59:59 PM</EndDate>
<LastEditorFname>Erik</LastEditorFname>
<LastEditorLname>Kozlowski</LastEditorLname>
<Hyperlink>
<a href="/it.aspx?id=16936">Test smartform 1</a>
</Hyperlink>
<DisplayStartDate/>
<FolderID>2594</FolderID>
<ContentStatus>A</ContentStatus>
<Language>1033</Language>
<DisplayDateModified>5/28/2009</DisplayDateModified>
<DisplayDateCreated>5/28/2009</DisplayDateCreated>
<DisplayEndDate/>
<EndDateAction>Archive_Expire</EndDateAction>
<Comment/>
<Image>/WorkArea/images/application/spacer.gif</Image>
<ImageThumbnail>/WorkArea/images/application/thumb_spacer.png</ImageThumbnail>
<FilePath>/it.aspx?id=16936</FilePath>
</Content>
</Collection>
If I choose Datemodified or Teaser for example, its fine. But I dont seem to have the right syntax for a nested value. Any ideas or am I going about this in the wrong direction?
|
|
|
|
|
I am assuming you are loading the xml to a dataset before binding the grid. Since you have nested xml, they will be loaded as different datatables I think. If this is the case, you can use the merge function to marge the datatables in your dataset and get it to display in your grid. This will be my first try.. There are many other way to do this. It all depends on the complixity of your xml structure
|
|
|
|
|
After loading an XML file into DataSet; DataSet creates number of DataTable instances so you have to decide which datatable instance you want to use.
For Example,
DataSet ds=new DataSet();
ds.ReadXml(....);
// List of DataTables
for(int i=0;i<ds.tables.count;i++) {
="" messagebox.show(ds.tables[i].tablename);
}=""
<div="" class="ForumSig">A DATAPOST COMPUTER CENTRE
(K.V Prajapati)
|
|
|
|
|
Hi,
I have a GridView which is showing a number of records.
Each record can be grouped by a column called "Status" and there are several possible status values, e.g. New, Open, Closed, Deferred, etc.
I've added a drop-down list and a button which allows me to choose one status value to be displayed in the list. I do this by setting the .FilterExpression property on my GridView and this works great. However, now there are loads of records on the system, I really need to be able to apply one or *more* status values to filter the GridView on. So I'd like to be able to choose, say, "New" and "Deferred".
I started off by adding a number of checkboxes, one for each possible status with the idea that I'd read the values and build a suitable filter expression but it's really clumsy looking.
What I'm looking for is a more elegant way of building up my FilterExpression string using checkboxes. Can anyone suggest an approach?
Thanks - and have a great weekend 
|
|
|
|
|
Try CheckBoxList
You can iterate through the list and get the text value of each item whose Checked value is True .
Evil cannot be conquered in the world... It can only be resisted within oneself.
|
|
|
|
|
how to handle changepassword button click event in changepassword control.
I didn't get its click event plz help...
|
|
|
|
|
The ChangePassword controls changes the password through the MembershipProvider specified in the web.config.
Look into ChangingPassword and ChangedPassword Events. These events will be fired before and after respectively if you click 'Change Password' button.
|
|
|
|
|
why do you need click event of changepassword control. You can use ChangePassword1_ChangingPassword() event instead.
|
|
|
|
|
Had you configured your web application with WAT - Web application administrative tool?
A DATAPOST COMPUTER CENTRE
(K.V Prajapati)
|
|
|
|
|
I am providing the user the option of adding image/smiley using FCKeditor.
but in my home page where i want to show only an abstract of the content,
i do not want to show either the image or the smiley that the user could
have added.
so inorder to create an abstract of the content, how to I ignore / filer out
images and smileys?
AT PRESENT, i am using string manipulation to remove substring between
"<img" and="" "="">". Is it the correct approach?
Thanks,
Netquestions
modified on Friday, May 29, 2009 10:55 AM
|
|
|
|
|
Hi all,
I have Dropdownlist1,Textbox1
The items in Dropdownlist1 are
>
<
=
!=
IS
Not
Like
Based on the selection only i need to enter the text in textbox1
i.,e
for > --only numbers
< --only numbers
= --value or Characters
!= --Value or Characters
IS --Null
Like --Characters
how to get all the above....
Regards,
Koti.K
|
|
|
|
|
set attribute ValidateRequest="false" at page directive.
A DATAPOST COMPUTER CENTRE
(K.V Prajapati)
|
|
|
|
|
Hi
After Make the validaterequest="false" at page tag
what i need to write in my page
|
|
|
|
|
katarukoti wrote: validaterequest="false"
This wont make any difference for you
If you want to restrict the values entered into the textbox, use javascript, and additionally you can use a CustomValidator either with a javascript function and/or a server side function to validate the input
Alexei Rodriguez
|
|
|
|
|
No, nothing.
A DATAPOST COMPUTER CENTRE
(K.V Prajapati)
|
|
|
|
|
kanu@adatapost wrote: set attribute ValidateRequest="false" at page directive.
What does this have to do with the question??
Alexei Rodriguez
|
|
|
|
|
i have created multiple uploading at runtime through javascript.
but at the time of upload file it can't find HttpFileCollection's File Request 0.
Thats why i am also getting file count 0.
Here i have attached the code for this one.Kindly help to find out this issue.Thanks.
function AddFileInput()
{
var tdFileInputs = document.getElementById('tdFileInputs');
var id = (new Date()).getTime();
var file = document.createElement('input');
file.setAttribute('id',id);
file.setAttribute('type','file');
tdFileInputs.appendChild(file);
var a = document.createElement('a');
a.setAttribute('id','remove_' + id);
a.innerHTML = "Remove<br>";
a.onclick = RemoveFileInput;
tdFileInputs.appendChild(a);
var lnkAttch = document.getElementById('lnkAttch');
count = count + 1;
if(count>0)
{
lnkAttch.innerHTML = "Attach another file";
document.getElementById("btnSend").style.display="";
}
else
{
document.getElementById("btnSend").style.display="none";
lnkAttch.innerHTML = "Attach a file";
}
}
function RemoveFileInput(e)
{
var Event = e ? e : window.event;
var obj = Event.target ? Event.target : window.event.srcElement;
var tdFileInputs = document.getElementById('tdFileInputs');
var a = document.getElementById(obj.id);
tdFileInputs.removeChild(a);
var fileInputId = obj.id.replace('remove_','');
var fileInput = document.getElementById(fileInputId);
tdFileInputs.removeChild(fileInput);
var lnkAttch = document.getElementById('lnkAttch');
count = count - 1;
if(count>0)
{
lnkAttch.innerHTML = "Attach another file";
document.getElementById("btnSend").style.display="";
}
else
{
lnkAttch.innerHTML = "Attach a file";
document.getElementById("btnSend").style.display="none";
}
}
Attachments:
|
| | | |
| <asp:button id="btnSend" runat="server" text="Upload" onclick="btnSend_Click">
|
|
<asp:label runat="server" id="lblFiles">
|
//code behind code is here...........................
protected void btnSend_Click(object sender, EventArgs e)
{
lblFiles.Text = "";
//Note: Here i can't get files..............................
HttpFileCollection files = Request.Files;
for (int i = 0; i < files.Count; i++)
{
HttpPostedFile file = files[i];
if (file.ContentLength > 0)
{
//You can perform uploading here
lblFiles.Text += " " + String.Format("File : {0} uploaded.", file.FileName);
}
}
}
|
|
|
|
|
I would like to Read but i think i will go blind with the scattered code you have posted. but your code inside the pre tag so that it will be formatted nicely.
e.g
int i = 0;
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Hi all,
At computer A, I have a simple web service which will generate folder "Example" in drive D. I also registered web page (default.aspx) using this web service with IIS.
At computer B, i call web page using: http://ip/default.aspx and click button to generate folder "Example" in drive D.
That i want is folder "Example" must be generated in drive D at computer B, not computer A. How can i do that if it is possible? or how can i download service code from server side to run at client side?
Regard,
|
|
|
|
|
Misperception WebService. Web service is a techonology that provides an interface for some functionality to make it accessible from other programs across the web. This functionality might be obtaining data from a database, performing mathematical calc., etc.
A DATAPOST COMPUTER CENTRE
(K.V Prajapati)
|
|
|
|
|
i wonder if there is a way to solve my problem.
Thanks anyway!
|
|
|
|
|
The code in your web service will be executed at server side only. It will not be executed at client side. Therefore you cannot use your web service to create folder in computer B(client).
You can create folder using FileSystemObject in ActiveXObject with JavaScipt.
But the security permission of the browser should allow ActiveX object to achive this.
Check this link[^].
|
|
|
|
|
If this is all internal network, and each client pc have a shared drive, and ignoring security constraints, i would pass the network path to the webservice so that the code will create the folder in the path provided as parameter.
Again, ignoring all security constraints...
|
|
|
|
|
In my form, I have two gridviews. The left one is binded automatically on the click of a button and both the gridviews are having checkboxes.
While selecting the checkbox on first row, that row should be added to the right gridview. when clicking on 2nd row checkbox, second should be added and likewise. This is possible on the click of a button. But I don't want a button click.
How should I do this on the oncheckchange of the checkbox in gridview? I googled it for sometime, but didn't get much help. Can anybody have any idea please?
Success is the good fortune that comes from aspiration, desperation, perspiration and inspiration.
|
|
|
|