|
samrat.net wrote: I want to bind a grid view through java script.
Gridview control exists on the server and will be rendered as normal HTML table. So you can't bind a gridview using JS. You can iterate through the data you are getting from webservice and add rows to the table using java script.
|
|
|
|
|
I'm not much sure but Have you tried Ajax for your problem?
Amit Agarwal
|
|
|
|
|
BIND : - it means the control is getting parsed/filled by server.
with javascript, u are able to change the innerHTML of any control only. that means, you need to call any page asynchronously on which gridview is being BIND and get the HTML of that page ), put that HTML into some control, may be DIV, on your current page.
This technique is used where no particular AJAX platform is used (OPEN).
refer http://www.w3schools.com/Ajax/ajax_browsers.asp[^] for more knowledge on this.
Ashish Sehajpal
|
|
|
|
|
Hello freinds...
I am Developing a project For Property Site.
and i want to give Live help in this project. Live chat just like http://www.magicbricks.com/property/faces/jsp/indexc.jsp[^] live help given in top of right.
So Please suggest me. How to Create live Chat Function in this project.
|
|
|
|
|
|
Check out http://www.hotscripts.com/[^] for the various chat components that may be available for you in your preferred technology.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
yahoo IM is favorite choice.
have you tried http://www.codeproject.com/KB/HTML/Yahoo.aspx[^]
try to get user credentials by hidden fields. provide one user id (yahoo id) for questioning (ready made for customers to ask question...they won't be aware they are using yahoo IM !) .... just a trick
Ashish Sehajpal
|
|
|
|
|
I don't know if this is a problem in my code or a manifestation of the vs2005 ide but if I run multiple copies of an ajax tabpanel enabled aspx page on my machine I run into "Sys.ArgumentOutOfRangeException: specified argument was out of the range of valid values. Parameter name: value" which occurs on line 69 of the scriptresource.axd (ajax code I think).
It dies here:
set_activeTabIndex : function(value) {
if (!this.get_isInitialized()) {
this._cachedActiveTabIndex = value;
} else {
if (value < -1 || value >= this.get_tabs().length) {
throw Error.argumentOutOfRange("value");
}
If I run only one copy of the page its fine. Seems to be unable to keep track of two copies simultaneously. I also have seen errors complaining about duplicate tabpanelid's in the same situation.
Any idea if this is related to the "casini" webserver ide or if it will go away if I run it under IIS? Currently I'm only running it in the ide. Thx.
|
|
|
|
|
Can we use the SUBSTRING in Index Search select Query... ie Something like the below..
cmdSearch.CommandText = "select Vpath, path, FileName, size, write, attrib, SUBSTRING(Characterization,90,DATALENGTH(Characterization)-1) as Characterization, DocTitle, rank from scope('shallow traversal of " + "\"" + "/Software" + "\"" + "," + "\"" + "/Industries" + "\"" + "," + "\"" + "/" + "\"" + "') where FREETEXT(contents,'" + searchText + "') and FileName NOT LIKE 'inc_%' and FileName NOT LIKE '%.js' and FileName NOT LIKE 'searchresult.aspx' and FileName NOT LIKE '%.css' order by rank desc ";
Im getting Error:
Incorrect syntax near '('. Expected ',', '.', FROM. SQLSTATE=42000
|
|
|
|
|
Have you tried removing the substring part and seeing what happens??
Anyways... whats this stuff for??
from scope('shallow traversal of " + "\"" + "/Software" + "\"" + "," + "\"" + "/Industries" + "\"" + "," + "\"" + "/" + "\"" + "')
Alexei Rodriguez
|
|
|
|
|
|
Ya If im removing the SUBSTRING the Query works fine.
The SCOPE() function is used to search the SEARCH STRING with my ROOT folder,Industries and Software folders only. No SubFolders are included while Searching.
|
|
|
|
|
Hi
I think there is no error in the SubString function, there is an error after scope function.
For searching multiple folders, syntax is given below:
<br />
SELECT "DAV:displayname"<br />
FROM <br />
SCOPE('shallow traversal of "http://myserver/public"',<br />
'shallow traversal of "http://myserver/public/userinfo"',<br />
'shallow traversal of "http://myserver/public/userinfo/phonenumber"')
Please check this site for more information:
http://msdn2.microsoft.com/en-us/library/aa579385(EXCHG.80).aspx[^]
When i debug your code, i got the following statement:
select Vpath, path, FileName, size, write, attrib, SUBSTRING(Characterization,90,DATALENGTH(Characterization)-1) as Characterization, DocTitle, rank from scope('shallow traversal of \"/Software\",\"/Industries\",\"/\"') where FREETEXT(contents,'abc') and FileName NOT LIKE 'inc_%' and FileName NOT LIKE '%.js' and FileName NOT LIKE 'searchresult.aspx' and FileName NOT LIKE '%.css' order by rank desc
which is different from the given syntax.
Hope this helps.
Harini
|
|
|
|
|
Hi Harini,
That SCOPE() function is working fine. Based on ur reply on yesterday only i solved that problem.
|
|
|
|
|
hi,
I have a menu in Default.aspx, based on the menu clicked corresponding user control is loaded dynamically using LoadControl(). This User control loaded has a formview control in which a dropdown and a textbox are present. When i set the autopost back property of the dropdown to true and select an item in it. The User control which is loaded is disappearing.
I have found that the page_load event of the Defualt.aspx is called.
I have used Ajax too..but it didn't help me. Can anyone help me ?
thanks,
deep.
modified on Friday, April 25, 2008 12:33 AM
|
|
|
|
|
Dynamically added controls are not regenerated when the page is posted back
If you are adding the controls in the pageload inside an ispostback condition, get it out of that condition, and let the controls be added each time the page is posted back
Alexei Rodriguez
|
|
|
|
|
Hi,
Then how can i maintain the state of the dropdown ? i.e if i select a particular value and load the control again.....the state of the drop is lost.... how can i fix this ?
Thanks,
deep.
|
|
|
|
|
Can you try to add your control in the Page_Init
Alexei Rodriguez
|
|
|
|
|
As AlexeiXX3 mentioned, dynamically generated controls are not recreated after the page postbacks.
The thing is that the postback resets the page to it's original state, so any information regarding the dynamically created controls is lost. Why is that? Because the Page class is stateless. The Page recreates child controls based on the tags in the aspx files, so your controls not being present there are not shown. What you need to do is recreate the controls in the OnInit event or any event that fires before PageLoad , or in PageLoad if you do a check to see is the page is posted back. See this article[^] as an example.
The thing to keep in mind is that when recreating the controls to assign them the same ID they previously had. This way you will retain the state of the controls. That's because when you postback a page the values of the controls are saved in the viewstate, but when state is restored to the controls, it actually looks for the controls with the coresponding ID's on the page. If it can find them it will restore them. So you don't have to worry about state as long as you recreate your controls correctly.
Cheers,
Mircea
"Pay people peanuts and you get monkeys" - David Ogilvy
|
|
|
|
|
Hi ,
I have added radio button dynamically during page loading.I have two questiions.
1) when I click radio button, have to call javascript function.
2) Get value of radio button(RadioButtonId.Value) when I click NextButton.
// Adding radio buttons Dynamically to panel control.
HtmlInputRadioButton rdb = new HtmlInputRadioButton();
for (int i = 0; i < dvForDisplay.Count; i++)
{
rdb.ID = dvForDisplay[i]["RadioButtonId"].ToString();
rdb.Value = dvForDisplay[i]["PaymentGateway"].ToString();
panelInternational.Controls.Add(rdb);
}
// Button click event
protected void btnNext_Click(object sender, EventArgs e)
{
here I want to get radion button value.
}
Can anybody help me..
Thanks
modified on Friday, April 25, 2008 12:18 AM
|
|
|
|
|
To get the value of the radiobutton, you need to add the controls to the panel again
Dinamically added controls are not regenerated when the page is posted back
If you are adding the controls in the pageload inside an ispostback condition, get it out of that condition, and let the controls be added each time the page os posted back
Alexei Rodriguez
|
|
|
|
|
Hi,
thanks for your reply. Can you tell me How to read controls from panel control?
HtmlInputRadioButton rdb = new HtmlInputRadioButton();
for (int i = 0; i < dvForDisplay.Count; i++)
{
rdb.ID = dvForDisplay[i]["RadioButtonId"].ToString();
rdb.Value = dvForDisplay[i]["PaymentGateway"].ToString();
panelInternational.Controls.Add(rdb);
}
Thanks
|
|
|
|
|
For Each ctrl As Control In panelInternational.Controls
If TypeOf ctrl Is RadioButton Then
Dim radio As RadioButton = CType(ctrl, RadioButton)
'Do what you want with radio variable wich has a control
End If
Next
In this example, im using radiobuttons and not htmlradiobuttons
If you are adding many radiobuttons to the panel i would recomend using a radiobuttonList (And add all the options you need to a single control)
Then to retrieve the selected value, Just use radiobuttonList.selectedValue
Alexei Rodriguez
|
|
|
|
|
Ok,
But I have to display image beside each radio button. Is it possible using Radiobutton list. please see the follwoing code.
HtmlInputRadioButton rdb = new HtmlInputRadioButton();
System.Web.UI.WebControls.Image imgasp = new System.Web.UI.WebControls.Image();
for (int i = 0; i < dvForDisplay.Count; i++)
{
rdb.ID = dvForDisplay[i]["RadioButtonId"].ToString();
rdb.Value = dvForDisplay[i]["PaymentGateway"].ToString();
panelInternational.Controls.Add(rdb);
panelInternational.Controls.Add(imgasp); // adding Image beside each radiio button
}
Thanks
|
|
|
|
|
Can you tell me how to validate on client side? If I click radio button have to call javascript function.
Thanks,
|
|
|
|