|
Are you using the open file dialog to select and open files?
What is the code within the IF?
|
|
|
|
|
I have a requirement in ASP.Net, where is there is a HTML page which will be around 1200 pages with records fetched from a Database using some reports. The records shown in HTML is in a Listed View some thing like
Name : BS
Age : 66
Work : Personal : xyz
: Buisines : xyz
Name : AA
Age : 66
Work : Offial : abc
: Buisines : abc
I need this format replicated to an excel sheet in the following way(column wise)
Name Age Work.Personal Work.Buisiness Work.Official
BS 66 xyz xyz NULL
AA 66 NULL abc abc
Remember the HTML page has around 1200 pages ie may be around 50,000 rows. And some times the column heirarchy for eg: work can be more like work-official-buisiness-abc-abc----. So taking data from each td is making the task that much difficult.
How can i meet this requirement?
And also since it is HTML page there is no runat = server for table. in this case how can i get the TD,TR,TABLE etc inside my server side code if i want to loop thorugh each TD and TR.
Please give me a solution which can meet this requirement.
Or with any other languages this can be met? i mean by Javascript or Java or etc???
Please help.
Thanks in advance.
Biju Sam
|
|
|
|
|
Biju Sam wrote: And also since it is HTML page there is no runat = server for table. in this case how can i get the TD,TR,TABLE etc inside my server side code if i want to loop thorugh each TD and TR.
Did you generate this table ? If so, who cares how it's run ? If not, how would a runat=server help you?
I guess you need to use a regex or something to parse the pages and get the data you need
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Thanks for the reply Graus.
No i did not generate this report. I was just trying to give a sample layout of the report.
1)Without runat=server how can i read the value in my .cs code?
2)How can i read through so many records inside HTML?
I did a lot of google search, but all the results just show a direct export from HTML to Excel. It will copy exactly the same structure as it is there in HTML.
But in my case the requirement is to convert from a List view to some what like Column like View(or like a Grid View)
Please Help
|
|
|
|
|
Biju Sam wrote: No i did not generate this report. I was just trying to give a sample layout of the report.
If it's not in your pages, how will runat=server help at all ? ( I asked this already )
Biju Sam wrote: How can i read through so many records inside HTML?
Like I said, if all you have is HTML, some sort of regex seems the best bet.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi,
I have Gridview which contains id, status, name, Edit button. The edit mode of the GridView will display the DropdownList for the Status column. So user selects the Edit button, and update the status by selecting from the DropdownList. My GridView has 100 rows. To update the Status, go to each row and select value from Dropdownlist and click on Update button. Instated of editing each row to change the value of Status, I want to to display the Checkboxes in one column in Gridview to update all at once(This is needed when we want to Update 30 rows with the one status value). Now Where we need to display the Dropdown list in the GridView to select the Status values and selecting the Check boxes. Can we display the dropDownlist in the Header row of GridView? and checkboxes are for each row.
In this situation what is the Best way?
Thanks in advance.
|
|
|
|
|
Mahimam wrote: Can we display the dropDownlist in the Header row of GridView? and checkboxes are for each row.
Yes, you can. Use TemplateColumn to do that.
|
|
|
|
|
Hi everyone!
i'm hving a ajax calender extender attached to a textbox.To txtbox i'm populating the selected date from calender control,now i want to restrict the user from entering any data manually into the txtbox.Could any one tell me how to do that ..
Thanks in advance
|
|
|
|
|
SunithaNallana wrote: i want to restrict the user from entering any data manually into the txtbox.Could any one tell me how to do that ..
return false onkeypress of textbox.
asp:textbox id="txt" runat="server" onkeypress="return false;"
|
|
|
|
|
My web page is working fine. But In the status bar, I am getting Done with other symbol (not IE symbol).
If I dbl click I am getting the following things in the window.
Line: 562
Char: 41
Error: expected ')'
Code 0
Url:...........frmBAFeedback.aspx
But My page is working fine according to the requirement. If I find the line number 562 in the view source by right clicking in the web page, all the things are fine. What I have to do for this?
Balasubramanian K.
|
|
|
|
|
BalasubramanianK wrote: Line: 562
Char: 41
Error: expected ')'
Code 0
Url:...........frmBAFeedback.aspx
This is a javascript error. Do you use javascript on this page or any ajax control?
regard
kHan
please don't forget to vote on the post that helped you.
|
|
|
|
|
Yes I am using java scripts on my page.
Balasubramanian K.
|
|
|
|
|
The script have to be fire on page load event...,
then call that script in body onload..,
either if u want to call that script during some event fire,
then do it in eventcontrol.attributes.add("event","function");
Thanks & Regards,
NeW OnE,
please don't forget to vote on the post
|
|
|
|
|
I have two functions.
function funEnableOrDisableTxtBox(objTextbox, objRadiobutton)
{
}
function funIsTextBoxEmpty()
{
}
I hv writn the follwong in page load
----
rbRndQRSSPoor.Attributes.Add("onClick", "funEnableOrDisableTxtBoxmstxtRndPoor1,rbRndQRSSPoor);")
btnSubmit.Attributes.Add("onClick", "return funIsTextBoxEmpty();")
---
Like this, I am calling this same function from other radio buttons click event also. If I comment this attributes.add, my page is loading well. But If I comment the body of the function, I am getting the error. Simply, I tried by giving the function name with out any body like mentioned above. Eventhough, I am getting Done with error. What to do? I think my problem is in attribute?
Balasubramanian K.
|
|
|
|
|
BalasubramanianK wrote: rbRndQRSSPoor.Attributes.Add("onClick", "funEnableOrDisableTxtBoxmstxtRndPoor1,rbRndQRSSPoor);")
Look at above code.
You have missed "("
It should be
funEnableOrDisableTxt(BoxmstxtRndPoor1,rbRndQRSSPoor);
regard
kHan
please don't forget to vote on the post that helped you.
|
|
|
|
|
No. No. I might missed to type in message board. '(' is there already
Balasubramanian K.
|
|
|
|
|
BalasubramanianK wrote: No. No. I might missed to type in message board. '(' is there already
Ok.So post your javascript function with code
please don't forget to vote on the post that helped you.
|
|
|
|
|
Problem is.........
I 've 4 radio buttons for Excellent, Good, Avg, Poor and one text box. If user select the poor, my txt box should be enabled and got focus. This is the requirement. So, I am calling this function for each radio buttons by passing arg.
rbRndQRSSPoor.Attributes.Add("onClick", "funEnableOrDisableTxtBox(mstxtRndPoor1,rbRndQRSSPoor);")
rbRndQRSSExc.Attributes.Add("onClick", "funEnableOrDisableTxtBox(mstxtRndPoor1,rbRndQRSSPoor);")
rbRndQRSSGood.Attributes.Add("onClick", "funEnableOrDisableTxtBox(mstxtRndPoor1,rbRndQRSSPoor);")
rbRndQRSSAvg.Attributes.Add("onClick", "funEnableOrDisableTxtBox(mstxtRndPoor1,rbRndQRSSPoor);")
function funEnableOrDisableTxtBox(objTextbox, objRadiobutton)
{
if (objRadiobutton.checked == true)
{
objTextbox.disabled = false;
objTextbox.focus()
}
else
{
objTextbox.disabled = true;
objTextbox.value = "";
}
}
on the above, I am passing the same args for all the dif radio buttons. Is not a proper way?.
Balasubramanian K.
|
|
|
|
|
Take RadioButtonList and call javascript onclick event and check Poor item is checked or not and make disabled true or false.
<asp:radiobuttonlist id="rbtn" runat="server" repeatdirection="horizontal" onclick="chk();" >
<asp:listitem text="Poor" value="0"></asp:listitem>
<asp:listitem text="Exc" value="1"></asp:listitem>
<asp:listitem text="Good" value="2"></asp:listitem>
<asp:listitem text="Avg" value="3"></asp:listitem>
</asp:radiobuttonlist>
<asp:textbox id="txt" runat="server" ></asp:textbox>
javascript function
function chk()
{
if(document.getElementById('rbtn_0').checked)
{
document.getElementById('txt').disabled=false;
document.getElementById('txt').focus();
}
else
{
document.getElementById('txt').disabled=true;
document.getElementById('txt').value='';
}
}
please don't forget to vote on the post that helped you.
modified on Friday, June 27, 2008 3:23 AM
|
|
|
|
|
Hi i am using gridview selection index change event...,
when i click a cell value, those values coming to my textbox,
same time page getting refresh...,
So which row i selected from the gridview its going down...,
using scrollbar i am seeing which one is selected...,
instead of that how to maintain gridview which one has been selected...,
Gridview Maintain Selected row after Postback
it mean its have to be auto scroll and have to point the place which row has been selected...,
how to do this?
Thanks & Regards,
NeW OnE,
please don't forget to vote on the post
modified on Friday, June 27, 2008 1:18 AM
|
|
|
|
|
Is the gidview inside a scrolling pane(whatever) or the scroll bar you talking about is the browser's scroll bar?
|
|
|
|
|
hai sherin,
me too the same problem in all case (textbox, gridview).
i speaking about Browser's scroll bar.
help me - KARAN
thanks in advance
|
|
|
|
|
Can you use
MaintainScrollPositionOnPostback=true
at page directive
|
|
|
|
|
Thanks a lot sherin.
it helps me a lot and i implemented
Thanks for understanding!
|
|
|
|
|
I want to call a java script function when my web page is loaded. What I have to do this. I tried like this...........
But I am getting error such like, funEnableTxtBox is not a member of asp.net
What I have to do?. Thanks in adv.
Balasubramanian K.
|
|
|
|