|
I am using a footer of a datagrid to add a row. After adding I want to set the focus on the first control of the footer.How can I achieve this.The following code is not working:
protected void gdViewCompliance_ItemCommand(object source, DataGridCommandEventArgs e)
{
if (e.CommandName == "Add")
{
Some code here
((TextBox)e.Item.FindControl("txtFtExeName")).Focus()
}
}
|
|
|
|
|
You need to have this code in the correct event i.e. either the page load or the onrowcreate event. I think.
|
|
|
|
|
hi everyone .
actually i want to know how compare a hiddenfields value with an integer:
like
if(1 <int.parse(request.form["schild"])><= 2)
how work this condition schild is the name of hidden field .which have the value of the dropdoenlist control.
Thanks.....Gaurav
|
|
|
|
|
Hi
I have controls listbox and checklistbox .
Depending upon the selected values I want search results.
I am getting selected values and I am storing it into the string variable.
e.g. string str = "one,two"
Now in database I have only one value related to that field but the string contains more than one value.
e.g.
id value
1 one
2 two
Now in searching string i.e.str contains the string that shows both the records as a result.
How should I compare string value to database value?
Thanks
|
|
|
|
|
You split the string between each word and then search for the indivdual word in the database, or you could create a new string on the fly to store each value in and then search the database using multiple string values to compare
|
|
|
|
|
if the current page =1 that must be disable
if the current page=2 that must be disable
remaining pages should be enable
|
|
|
|
|
Im getting the feeling of dajavu, didnt you ask this question yday resulting in a massive post?
|
|
|
|
|
i m using web login control but remember me next time is not work
plz send me solution
Thanks & Regards
lav
lav naphade
|
|
|
|
|
lav naphade wrote: i m using web login control but remember me next time is not work
Post your code
please don't forget to vote on the post that helped you.
|
|
|
|
|
Look Here[^]
EVEN THE WORD IMPOSSIBLE SAYS I M POSSIBLE.
|
|
|
|
|
Hi
I apologise if people feels its duplicate as I posted this question yesrteday. But unfortunately didnt get the desired solution. I am posting here today as I hope I can get a solution today atleast!!
I have a dll("sample.dll") written in .NET and I have givena strong name and installed into my system's GAC. I can see that dll ("sample.dll") into GAC ( as I have registered using GACUTIL tool).
Now I expect to this dll to appear in list of dll that appears in .NET tab of Add Reference window.
as I know that any GAC dll is listed in this tab.
Whats going wrong here? How can I see my dll("sample.dll") into list of .NET or COM tab of Add Reference window ?
Thanks in advance,
Thanks,
Arindam D Tewary
|
|
|
|
|
Arindam Tewary wrote: as I know that any GAC dll is listed in this tab.
I dont think So.
.Net tab displaying the dlls from .net directory only.
Arindam Tewary wrote: Now I expect to this dll to appear in list of dll that appears in .NET tab of Add Reference window.
You can do this by copy your dll to(.net 2.0)
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
directory
EVEN THE WORD IMPOSSIBLE SAYS I M POSSIBLE.
|
|
|
|
|
Thanks Sherin. Cool ans .. It worked magically !!!
Thanks,
Arindam D Tewary
|
|
|
|
|
A better option would be putting in Program Files\Microsoft Visual Studio 8\Common7\IDE\PublicAssemblies
|
|
|
|
|
Any idea what are dlls listed in COM tab ?
Thanks,
Arindam D Tewary
|
|
|
|
|
I believe those are registered "COM" DLL's which can be referred.
|
|
|
|
|
Navaneeth is right, The registered COM dlls. And you can register your dll usingn regsvr32, If it is a com dll.
EVEN THE WORD IMPOSSIBLE SAYS I M POSSIBLE.
|
|
|
|
|
Hi all
please help me to convert
following code
<br />
<br />
public partial class _Default : System.Web.UI.Page<br />
<br />
, ICallbackEventHandler I face difficulty here <br />
{<br />
<br />
IList<product> list = null;<br />
<br />
protected void Page_Load(object sender, EventArgs e)<br />
{<br />
RegisterClientCallbacks(); <br />
}<br />
<br />
private void RegisterClientCallbacks()<br />
{<br />
string callbackRef = ClientScript.GetCallbackEventReference(this, "arg", "RecieveServerData", "context");<br />
<br />
string script = String.Empty;<br />
<br />
if (!ClientScript.IsClientScriptBlockRegistered("CallServer"))<br />
{<br />
script = "function CallServer(arg,context) { " + callbackRef + "}";<br />
<br />
ClientScript.RegisterClientScriptBlock(this.GetType(), "CallServer", script, true);<br />
}<br />
}<br />
<br />
<br />
<br />
public string GetCallbackResult()<br />
{<br />
return HtmlTableHelper.ConvertProductListToTable(list); <br />
}<br />
<br />
public void RaiseCallbackEvent(string eventArgument)<br />
{<br />
if (String.IsNullOrEmpty(eventArgument)) return;<br />
<br />
list = ProductRepository.GetProducts(eventArgument); <br />
}<br />
<br />
<br />
}<br />
<br />
<br />
<br />
<br />
</product>
|
|
|
|
|
amistry_petlad wrote: Hi all
please help me to convert
Visit Convert C# to VB
please don't forget to vote on the post that helped you.
|
|
|
|
|
Imran Khan Pathan wrote: Visit Convert C# to VB
It's a bad tool. It generates incorrect code most of the time.
|
|
|
|
|
What difficulty?
Here the class implements ICallbackEventHandler and iherits from Page class !!!
Thanks,
Arindam D Tewary
|
|
|
|
|
amistry_petlad wrote: asp.net c# conversion help in vb.net
Do you want convert this to vb?
EVEN THE WORD IMPOSSIBLE SAYS I M POSSIBLE.
|
|
|
|
|
|
<br />
Partial Class _Default<br />
Inherits System.Web.UI.Page<br />
Implements ICallbackEventHandler<br />
<br />
Dim lst As IList<br />
<br />
Public Sub RaiseCallbackEvent(ByVal eventArgument As String) Implements ICallbackEventHandler.RaiseCallbackEvent<br />
'Operations<br />
End Sub<br />
End Class<br />
implement all functions in ICallbackEventHandler in same way.
If you are not able to do come back.
EVEN THE WORD IMPOSSIBLE SAYS I M POSSIBLE.
|
|
|
|
|
help me to handle this code in vb.net
I have put one textbox and when someone try to type inside the like name it will be fetch from the datbase and listout that names below in the textbox area then he can select and submit that text.
e.g.
example suppose somebody push his first two letter 'am' then the request goes like criteria inside and fetch that name list like amit ,amika,amrita and so on and that person select one name and submit that name.
so for that I have got one application from the code project but i have to need some help for initial part.
so please anybody can help me its urgent
<br />
Imports System.Data<br />
Imports System.Data.SqlClient<br />
Imports System.Configuration<br />
<br />
Partial Class _Default<br />
Inherits System.Web.UI.Page<br />
Implements ICallbackEventHandler<br />
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load<br />
RegisterClientCallbacks() <br />
End Sub<br />
Protected Sub RegisterClientCallbacks()<br />
<br />
Dim callbackRef As String<br />
Dim script As String<br />
callbackRef = ClientScript.GetCallbackEventReference(Me, "arg", "RecieveServerData", "context")<br />
script = String.Empty<br />
<br />
If Not ClientScript.IsClientScriptBlockRegistered("CallServer") Then<br />
<br />
script = "function CallServer(arg,Context) { " + callbackRef + "}"<br />
ClientScript.RegisterClientScriptBlock(Me.GetType(), "CallServer", script, True)<br />
End If<br />
<br />
public string GetCallbackResult()<br />
{<br />
<br />
return HtmlTableHelper.ConvertProductListToTable(list); <br />
}<br />
<br />
public void RaiseCallbackEvent(string eventArgument)<br />
{<br />
if (String.IsNullOrEmpty(eventArgument)) return;<br />
<br />
list = ProductRepository.GetProducts(eventArgument); <br />
}<br />
<br />
End Sub<br /> this codebehind it is in .cs
now moving on .aspx page
<br />
<br />
<body><br />
<form id="form1" runat="server"><br />
Search<br />
<asp:textbox id="txtSearch" name="txtSearch" onkeydown="return GetProducts(event)" runat="server" xmlns:asp="#unknown"></asp:textbox><br />
<asp:button id="Button2" runat="server" text="Button" xmlns:asp="#unknown" /><br />
<br />
</form><br />
</body><br />
<br />
<script language="javascript" type="text/javascript"><br />
<br />
var word = ''; <br />
var UP = 38; <br />
var DOWN = 40; <br />
var ENTER = 13;<br />
var index = -1; <br />
var TAB = 9; <br />
var BACKSPACE = 8; <br />
<br />
var table = null; <br />
var rows = null;<br />
<br />
var selectedRow = null;<br />
<br />
function GetProducts(e) <br />
{<br />
var keynum<br />
var keychar<br />
var numcheck<br />
<br />
if(window.event)
{<br />
keynum = e.keyCode<br />
}<br />
else if(e.which)
{<br />
keynum = e.which<br />
}<br />
keychar = String.fromCharCode(keynum)<br />
numcheck = /\d/<br />
<br />
if(keynum == DOWN) <br />
{ <br />
MoveCursorDown(); <br />
return;<br />
}<br />
<br />
else if(keynum == UP) <br />
{ <br />
MoveCursorUp(); <br />
return; <br />
}<br />
<br />
else if(keynum == ENTER) <br />
{<br />
if(IsFireFox()) <br />
{<br />
document.getElementById("txtSearch").value = selectedRow.childNodes[1].innerHTML;<br />
}<br />
else <br />
{<br />
document.getElementById("txtSearch").value = selectedRow.innerText; <br />
}<br />
document.getElementById("results").innerHTML = '';<br />
return false;<br />
}<br />
<br />
if(keynum != DOWN && keynum != UP && keynum >= 65 && keynum <= 90) <br />
{<br />
word = word + keychar; <br />
}<br />
<br />
else if(keynum == BACKSPACE) <br />
{<br />
<br />
word = word.substring(0,word.length-1); <br />
}<br />
<br />
<br />
CallServer(word,'');<br />
<br />
}<br />
<br />
function IsFireFox() <br />
{<br />
return (navigator.appName == 'Netscape'); <br />
}<br />
<br />
function MoveCursorUp() <br />
{<br />
selectedRow = null; <br />
table = document.getElementById("MyTable");<br />
<br />
if(table == null) return;<br />
<br />
rows = table.getElementsByTagName("TR"); <br />
<br />
if(index > 0) <br />
{<br />
index--; <br />
<br />
SetDefaultRowColor();<br />
selectedRow = rows[index];<br />
selectedRow.className = 'HighlightRow' <br />
} <br />
}<br />
<br />
function MoveCursorDown() <br />
{<br />
selectedRow = null; <br />
table = document.getElementById("MyTable");<br />
<br />
if(table == null) return;<br />
<br />
rows = table.getElementsByTagName("TR");<br />
<br />
if(index < rows.length) <br />
{ <br />
<br />
if(index < rows.length -1)<br />
{ <br />
index++; <br />
SetDefaultRowColor(); <br />
selectedRow = rows[index];<br />
selectedRow.className = 'HighlightRow'; <br />
}<br />
<br />
} <br />
}<br />
<br />
function SetDefaultRowColor() <br />
{<br />
for(i=0;i<rows.length;i++)><br />
{<br />
rows[i].className = 'DefaultRowColor';<br />
} <br />
}<br />
<br />
<br />
function RecieveServerData(response) <br />
{<br />
document.getElementById("results").innerHTML = response; <br />
}<br />
<br />
</script>
thanks
modified on Tuesday, July 8, 2008 2:21 PM
|
|
|
|