|
Hi Guys,
I hope some of you already encountered this scenario when placing the GridView inside the Panel.
I actually place my GridView inside the Panel to have a scrollbar. I used the panel in order for me to control the height of gridview through the Panel.
But my problem is whenever I edited something on the gridview, let's say editing the row# 50, the row will refresh and always back to row# 1, which is incorrect.
How can I maintain the gridview row# when I click on the "Edit" (Edit mode)?
I actually tried using the MaintainScrollPositionOnPostback=true, but it won't stop the problem.
Any idea, how to correct it?
By the way I am using ASP.Net 2.0/Ajax (vb.net coding)
hifiger2004
|
|
|
|
|
Hi
I have a 2 radio buttons (not radio button list) and 1 label and 1 textbox in the page.
On pageload, i made label visible and textbox invisible. when clicking the other radio button,
on selected_index change i made the textbox visible and label invisible.
But i want the same using javascript as i dont the postback to happen.
Could somebody provide me the code for this.
Thanks in advance
Naina
|
|
|
|
|
function showControl(id)
{
var ctrl = document.getElementById(id);
ctrl.style.visibility = "visible";
}
function hideControl(id)
{
var ctrl = document.getElementById(id);
ctrl.style.visibility = "hidden";
}
See this[^] for more help.
Be careful, there is no Undo Button(Ctrl+Z) in life.
|
|
|
|
|
hi,,
But document.getElementbyId(id) -->> returns the null value.
how it will work..
Plz help me.....
|
|
|
|
|
hi i am trying to open a pdf from a sql database using vbscript, the problem that i'm having it that if the pdfs contain images and more that 1 page, it throws an error, pdfs containg text works fine
your help will be much appreciated................what am i doing wrong?
this is my code:
<![CDATA[<%@Language=VBScript%>]]>
<![CDATA[<%
Response.Buffer = false
Response.Expires = -1
%>]]>
<![CDATA[<%
' ID of the file to retrieve
Dim fileID
fileID = Request("idf")
if isnumeric(fileID) then
'ok
else
Response.Write "Service is temporary unavailable<br>Please try again later."
Response.end
end if
' get file from database ...
if rs.EOF then
else
Response.AddHeader "Content-Disposition", "filename=" & rs("FileName")
Response.ContentType = rs("ContentType")
Response.BinaryWrite RS("FileData")
End If
Response.End
%>]]>
|
|
|
|
|
Hi,
could you post the error message? Just thinking about this ContentType-stuff, do you use the same content-type ('application/pdf') for all?
Regards
Sebastian
|
|
|
|
|
Hi
we have a data object that is used in WindowsForm applications and should now be used also in a webservice. The data object has fields that have the attribute DefaultValue. With this attribute, accessing the web service fails with an error. Without the attribute it works.
This is the code (example code that causes the same problem):
using System;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class Service : System.Web.Services.WebService
{
public Service ()
{
}
[WebMethod]
public Foo Test1(Foo foo)
{
return foo;
}
}
public class Foo
{
private char bar;
[System.ComponentModel.DefaultValue(',')]
public char Bar
{
get { return bar; }
set { bar = value; }
}
}
And this is the error:
Server Error in '/TestWebService1' Application.<br />
--------------------------------------------------------------------------------<br />
<br />
The default value type, System.Char, is unsupported. <br />
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. <br />
<br />
Exception Details: System.Exception: The default value type, System.Char, is unsupported.<br />
<br />
Source Error: <br />
<br />
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
How can I fix this without removing the attrribute, as it is used for changing the properties of a Control that is using this data object in the Visual Studio.
Thanks and greets
Roland
Additional Note:
The XmlIgnore attribute should not be used as it should be still serializable to an xml file.
modified on Thursday, February 5, 2009 8:26 AM
|
|
|
|
|
I want to learn how to create a forum for discussion for internal use in the company using DotNet.
Please provide me an appropriate link.
Please advice on what are the prerequisites required before starting to develop.
I have just now started learning ASP .Net.
|
|
|
|
|
Before you spend time creating a Forum, take a look at DotNetNuke which is an Open Source Web Application Framework that is built around ASP.NET technologies. Out of the box it has a good forum system, but there are plenty of "for purchase" modules that have better forums that plug right into the DNN (dot net nuke) framework. I've implemented it as a company intranet portal and it is really amazing. Free!
http://www.dotnetnuke.com/[^]
|
|
|
|
|
Thanks David ... I shall refer the website you mentioned and get back to you.
|
|
|
|
|
Dave, Are there books on the same topic that I can purchase and refer?
|
|
|
|
|
ASP.NET 2.0 Website Programming by Marco Bellinaso is a book I came across while searching the web.
It has a chapter on Forums.
Please do let me know if this chapter would be sufficient?
|
|
|
|
|
hi
I have a datagrid and in it i have put a textbox using the template items and i assign the value of the item ID to the textbox and its working fine, but i want to do a double click on a row and would like to return the value in the text box. I have added an attribute in the itemdatabound event as shown below. My problem is, if i double click my javascript alert function keeps returning the same value.
Does anyone know what im doing wrong.
protected void rdgAccounts_ItemDataBound1(object sender, DataGridItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.Item)
{
string text = ((System.Web.UI.WebControls.TextBox)e.Item.FindControl("txt")).Text;
rdgAccounts.Attributes.Add("ondblclick", "return OpenGrid('" + text + "');");
}
}
function OpenGrid(txt2)
{
alert(txt2);
}
|
|
|
|
|
Dear,
I am using control ntb combo
<a href="http://www.nitobi.com/products/completeui/demos/explorer/">http://www.nitobi.com/products/completeui/demos/explorer/</a>[<a href="http://www.nitobi.com/products/completeui/demos/explorer/" target="_blank" title="New Window">^</a>]
the control to use
-Namespace &lt;html xmlns:ntb&gt;
-javaScript files
Control Render in browser Like this
<pre><ntb:Combo TABINDEX=0 id="H_Unit_22_0_" InitialSearch="zzz__is__1000002" Mode="classic" >
<ntb:ComboTextBox width=245px OnEditKeyUpEvent="ifEmptyRepopulate(this)" DataFieldIndex=1></ntb:ComboTextBox>
<ntb:ComboList OnHideEvent="TextboxSetSelection('H_Unit_22_0_');" OnAfterSearchEvent="TextboxSetInitialValue('H_Unit_22_0_');" height=200 width=748px
DatasourceUrl="b6fm/getData.asp?tr=47&viewid=0&req=0" PageSize="50" >
<ntb:ComboColumnDefinition width=120px HeaderLabel="Caption" DataFieldIndex=1>
</ntb:ComboColumnDefinition>
<ntb:ComboColumnDefinition width=120px HeaderLabel="Id" DataFieldIndex=0>
</ntb:ComboColumnDefinition></ntb:ComboList></ntb:Combo>
I want to create this control Dyanmicly
I am create <td> and added it in table I dont problem in this I
Tired
txt = '<ntb:Combo TABINDEX=4 id="' + comboName + '" Mode="classic" theme="outlook" >';
txt = txt + '<ntb:ComboTextBox width=245px OnEditKeyUpEvent="ifEmptyRepopulate(this)" DataFieldIndex=1></ntb:ComboTextBox>'
txt = txt + '<ntb:ComboList OnHideEvent="TextboxSetSelection(' + sq + comboName + sq + ');" height=200 width=766px DatasourceUrl="b6fm/getData.asp?tr=51" PageSize="50">';
txt = txt + '<ntb:ComboColumnDefinition width=240px HeaderLabel="Display Name" DataFieldIndex=1>';
txt = txt + '</ntb:ComboColumnDefinition><ntb:ComboColumnDefinition width=180px HeaderLabel="First Name" DataFieldIndex=2>';
txt = txt + '</ntb:ComboColumnDefinition><ntb:ComboColumnDefinition width=180px HeaderLabel="Last Name" DataFieldIndex=3>';
txt= txt + '</ntb:ComboColumnDefinition><ntb:ComboColumnDefinition width=132px HeaderLabel="User Id" DataFieldIndex=0>';
txt = txt + '</ntb:ComboColumnDefinition></ntb:ComboList></ntb:Combo>';</pre>
tdNode.innerHTML=txt; /// I dont have problem in tdNode
also tired
working in attribute will not make Differance
var comboNode = document.createElement('ntb:Combo');
var comboText= document.createElement('ntb:ComboTextBox');
var comboList=document.createElement('ntb:ComboList');
var comboColumn=document.createElement('ntb:ComboColumnDefinition');
var comboColumn2=document.createElement('ntb:ComboColumnDefinition');
comboNode.id="'" + comboName + "'";
comboNode.Mode="'classic'";
comboText.OnEditKeyUpEvent="ifEmptyRepopulate(this)";
comboText.DataFieldIndex="1";
comboText.width="245px";
comboList.OnHideEvent="TextboxSetSelection('" + sq + comboName + sq + '); ' ;
comboList.height=200;
comboList.width='766px';
comboList.DatasourceUrl="b6fm/getData.asp?tr=99";
comboList.PageSize="50";
comboColumn.width="240px";
comboColumn.DataFieldIndex=1;
comboColumn.HeaderLabel="Display Name";
comboColumn2.width="240px";
comboColumn2.DataFieldIndex=0;
comboColumn2.HeaderLabel="User Id";
comboList.appendChild(comboColumn);
comboList.appendChild(comboColumn2);
comboNode.appendChild(comboText);
comboNode.appendChild(comboList);
tdNode.appendChild(comboNode);
also tired
var comboNode = document.createElementNS("ntb",'ntb:Combo');
var comboText= document.createElementNS("ntb",'ntb:ComboTextBox');
var comboList=document.createElementNS("ntb",'ntb:ComboList');
var comboColumn=document.createElementNS("ntb",'ntb:ComboColumnDefinition');
var comboColumn2=document.createElementNS("ntb",'ntb:ComboColumnDefinition');
same....
When I tring
to get the value innerhtml of td :: document.getElementById ("td"+combArr[i]).innerHTML // combArr[i] name...no prblem here
give me correctly the tags ::--
this alert
---------------------------
Windows Internet Explorer
---------------------------
<pre>|td| <?xml:namespace prefix = ntb /><ntb:Combo id="'vComboTest'" Mode="'classic'"><ntb:ComboTextBox width="245px" DataFieldIndex="1" OnEditKeyUpEvent="ifEmptyRepopulate(this)"></ntb:ComboTextBox><ntb:ComboList PageSize="50" DatasourceUrl="b6fm/getData.asp?tr=99" height="200" OnHideEvent="TextboxSetSelection(''vComboTest'); "><ntb:ComboColumnDefinition DataFieldIndex="1" HeaderLabel="Display Name"></ntb:ComboColumnDefinition><ntb:ComboColumnDefinition DataFieldIndex="0" HeaderLabel="User Id"></ntb:ComboColumnDefinition></ntb:ComboList></ntb:Combo></pre>---------------------------
OK
---------------------------
<b>but if i get last ntb Combo will display</b>
<pre> alert ("|combo|" +document.getElementsByTagName("Combo")[ document.getElementsByTagName("Combo").length -1 ].innerHTML);
the first tag
<ntb:Combo TABINDEX=4 id="' + comboName + '" Mode="classic" theme="outlook" >';
is missed up
<b>the alert like this</b></pre>
---------------------------
Windows Internet Explorer
---------------------------
<pre>|combo|<?xml:namespace prefix = ntb /><ntb:ComboTextBox width="245px" DataFieldIndex="1" OnEditKeyUpEvent="ifEmptyRepopulate(this)"></ntb:ComboTextBox><ntb:ComboList PageSize="50" DatasourceUrl="b6fm/getData.asp?tr=99" height="200" OnHideEvent="TextboxSetSelection(''vComboTest'); "><ntb:ComboColumnDefinition DataFieldIndex="1" HeaderLabel="Display Name"></ntb:ComboColumnDefinition><ntb:ComboColumnDefinition DataFieldIndex="0" HeaderLabel="User Id"></ntb:ComboColumnDefinition></ntb:ComboList></pre>---------------------------
OK
---------------------------
<b>I am confused how can be solved that</b>
regards
Yes. CreatiVity withOuT limiTs
modified on Wednesday, February 4, 2009 12:31 PM
|
|
|
|
|
You need to fix up your post. Its got about 0.01% readability. >.>
|
|
|
|
|
I need a dual handle slider in asp.net 2.0 framework
modified on Wednesday, February 4, 2009 5:03 AM
|
|
|
|
|
thats nice, did you have a question?
|
|
|
|
|
Didn't you get the memo? No one has questions these days...only demands.
|
|
|
|
|
I tried to find the dual hand slider control but i was not able to get this
I want to implement price sorting using dual hand slider
please give any reference for this ?
|
|
|
|
|
I have a web application that I apparently support now... The original people involved with it are long gone. How can I locate which server the app is on? All I have is the external web address.
|
|
|
|
|
Hi,
if your company is hosting the site, check which server is the first one to be addresses from the web (by getting the ip). Then you have to check at this server if it is hosting the app or just doing a redirect. This will lead you to the next server... and so on.
If your site is hosted by a provider you can get the provider by looking up the ip or using the whois-command (type whois in google).
Regards
Sebastian
|
|
|
|
|
Hi All
I want to open a page present in someother folder under a website in a new window by using ClientScript.RegisterStartUpScript().
Can somebody help me in doing this.
Regards
Naina
|
|
|
|
|
I hope this will help
this.ClientScript.RegisterStartupScript(
this.GetType(),
"Window",
"window.open('../OtherDirectory/NewPage.aspx','','width=300,height=300,left=200,top=200');",
true);
Be careful, there is no Undo Button(Ctrl+Z) in life.
|
|
|
|
|
Hi
Thank you for the reply. But its not working in my application. The window is not opening.
i used the same code given by you in the link button "onclick" event. Could you please
suggest me on this.
Regards
Naina
|
|
|
|
|
Are you using onclick event for button? Onclick is server side event. Try onclientclick event.
<asp:button id="Button1" xmlns:asp="#unknown">
usesubmitbehavior="true"
text="Open Web site"
onclientclick="OpenNewWindow()"
runat="server" >;
</asp:button>
<script type="text/javascript">
function OpenNewWindow()
{
window.open('../OtherDirectoryNewPage.aspx','','width=300,height=300,left=200,top=200')
}
</script>
Be careful, there is no Undo Button(Ctrl+Z) in life.
|
|
|
|