|
dwadasi wrote: i have loaded dyamic controls like checkboxes,
The problem may be because of that.
dwadasi wrote: based on the Checkbox selection, i want some DDL operations
Why cant you write a property for that?
EVEN THE WORD IMPOSSIBLE SAYS I M POSSIBLE.
|
|
|
|
|
Hi,
I do not have my website URL in my wwwroot folder, but some where on my C drive. How do I get the root path of where my website resides?
Thanks
Brendan
|
|
|
|
|
|
.NET Enthusiast wrote: How do I get the root path of where my website resides?
Server.MapPath("/") gives the root path for that server.
|
|
|
|
|
.NET Enthusiast wrote: How do I get the root path of where my website resides?
Server.MapPath("~")
gives you the root folder of your application.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
how to work with .net and Flex.
I am very new for flex so please give me some Help for starting Flex and .net communication Steps.
Thanks
Piyush Vardhan Singh
p_vardhan14@rediffmail.com
http://holyschoolofvaranasi.blogspot.com
http://holytravelsofvaranasi.blogspot.com
|
|
|
|
|
Piyush Vardhan Singh wrote: I am very new for flex so please give me some Help for starting Flex and .net communication Steps.
Here is one article to upload multiple file using flex and .net.
Visit Click Here
Regard
kHan
please don't forget to vote on the post that helped you.
|
|
|
|
|
Thanks For reply
I am talking about this flex just i want to use my .net dll in flex.
Link:-
http://www.themidnightcoders.com/weborb/dotnet/[^]
Piyush Vardhan Singh
p_vardhan14@rediffmail.com
http://holyschoolofvaranasi.blogspot.com
http://holytravelsofvaranasi.blogspot.com
|
|
|
|
|
how to select a range of text of a text box , i have the start and end point. but i want that as seleced ?
please help !!!
element.selectionStart = start; element.selectionEnd = end;
now i want to selct that area.
cheers,
Abhijit
|
|
|
|
|
Try this
<br />
var txtRange = txtBox.createTextRange();<br />
txtRange.moveStart("character", start);<br />
txtRange.moveEnd("character", end);<br />
txtRange.select();<br />
txtBox.focus();<br />
EVEN THE WORD IMPOSSIBLE SAYS I M POSSIBLE.
|
|
|
|
|
Sherin Iranimose wrote: txtRange.moveStart("character", start);
txtRange.moveEnd("character", end);
what about this "character" ?
i am having following Text in a text box
"test1;test2;test3;test4";
now i have clicked on test2. i am getting first postion of test2 and last postion.
now i want to select that one . just for delete as in outlook text box.
Thanks for ans !!!
cheers,
Abhijit
|
|
|
|
|
"character" is to specify, Moves one or more characters.
We can use "word","sentence","textedit".
Look Here[^]
Abhijit Jana wrote: now i have clicked on test2. i am getting first postion of test2 and last postion.
now i want to select that one .
Do you want to do this? OR already Done?
EVEN THE WORD IMPOSSIBLE SAYS I M POSSIBLE.
modified on Monday, July 7, 2008 9:46 AM
|
|
|
|
|
Sherin Iranimose wrote: Do you want to do this? OR already Done?
i have alredy done !! i just need to select that area .
cheers,
Abhijit
|
|
|
|
|
Hi, i have done this in this way.
rng=elem.createTextRange();<br />
rng.findText(val.substring(start,end));<br />
rng.select();
Thanks for your help !!!
cheers,
Abhijit
|
|
|
|
|
EVEN THE WORD IMPOSSIBLE SAYS I M POSSIBLE.
|
|
|
|
|
but i am geeting 1 problem,if there is same entry , first one is selected
any idea !!!
cheers,
Abhijit
|
|
|
|
|
You must rewrite the logic of finding the "start" and "end".
EVEN THE WORD IMPOSSIBLE SAYS I M POSSIBLE.
|
|
|
|
|
Hi,
I am newbie to asp.net C#, so I am not sure how to read the data from SQL Express database and validate the user input from the database using asp.net C#. Mostly from book and internet are in VB language. I don't want use login control in asp.net C#. The below is I create the main page myself. In vb,I am ok with it but C# not good.
Anyone can help and any recommended website for asp.net C#?
The bottom is my source code where I have tried to use SQLdataReader:
aspx
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Default3.aspx.cs" Inherits="Default3" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Main" Runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="Navigation" Runat="Server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="Footer" Runat="Server">
</asp:Content>
<asp:Content ID="Content5" runat="server"
contentplaceholderid="RightTopContent">
<asp:Image ID="Image1" runat="server" Height="26px" Width="162px" />
<br />
Username :<asp:TextBox ID="txtUserName" runat="server"></asp:TextBox>
<br />
Password :<asp:TextBox ID="txtPassword" runat="server"></asp:TextBox>
<br />
<asp:Button ID="btnSubmit" runat="server" onclick="btnSubmit_Click"
Text="Login" />
<br />
</asp:Content>
<asp:Content ID="Content6" runat="server"
contentplaceholderid="RightMiddleContent">
</asp:Content>
<asp:Content ID="Content7" runat="server" contentplaceholderid="MainContent">
</asp:Content>
aspx.cs
protected void btnSubmit_Click(object sender, EventArgs e)
{
string uname = txtUserName.Text;
string pwd = txtPassword.Text;
string connectionString = "Data Source= .\\SQLEXPRESS;"
+ "AttachDbFilename=\"C:\\Documents and Settings\\kathy\\My Documents\\Visual Studio 2008\\WebSites\\WebSite1\\App_Data\\salon.mdf\";"
+ "Integrated Security=True;"
+ "User Instance=True";
SqlConnection myConnection = new SqlConnection(connectionString);
SqlCommand cmd = myConnection.CreateCommand();
cmd.CommandText = "SELECT * FROM [Customer]";
myConnection.Open();
SqlDataReader dr = cmd.ExecuteReader();
while (dr.Read())
{
if (dr.GetOrdinal("UserName").ToString() == txtUserName.Text)
{
Response.Write("Heelo");
//dr.Close();
}
//dr.Close();
myConnection.Close();
}
|
|
|
|
|
Check out the <asp:Login /> control (and related), with the only really important event the Authenticate event.
-Domenic Denicola-
|
|
|
|
|
I really can't figure this one out; sorry guys.
I have a pretty-standard WCF service, with a contract something like this:
[ServiceContract(Namespace="http://www.domenicdenicola.com/")]
public interface IMyService
{
[OperationContract]
[WebInvoke]
void PerformBigOperation();
[OperationContract]
[WebInvoke]
int GetProgress();
}
I generate the ASP.NET AJAX proxy class in the usual way:
<asp:ScriptManager ID="ScriptManager" runat="server">
<Services>
<asp:ServiceReference Path="MyService.svc" />
</Services>
</asp:ScriptManager>
I then call them from JavaScript like so:
var service = new www.domenicdenicola.com.IMyService();
function UpdateProgress()
{
service.GetProgress(function onSuccess(result)
{
$get("Status").innerHTML = result + " % complete…";
setTimeout(UpdateProgress, 1500);
});
}
function PerformBigOperation()
{
setTimeout(UpdateProgress, 1500);
service.PerformBigOperation(function onSuccess(result)
{
$get("Status").innerHTML = "Done.";
});
} where PerformBigOperation is called upon clicking a button, and Status is the ID of a status <p /> tag.
I also have set Async="True" in my <%@ Page %> directive. (This seems to make no difference.) My web.config contains the following relevant sections:
<system.serviceModel>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true"/>
<extensions>
<behaviorExtensions>
<add name="enableWebScript" type="(a long string)"/>
</behaviorExtensions>
<bindingExtensions>
<add name="webHttpBinding" type="(a long string)"/>
</bindingExtensions>
</extensions>
<bindings>
<webHttpBinding/>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="Behavior">
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="true"/>
<serviceThrottling maxConcurrentCalls="1000" maxConcurrentSessions="1000"/>
</behavior>
</serviceBehaviors>
<endpointBehaviors>
<behavior name="EndpointBehavior">
<enableWebScript/>
</behavior>
</endpointBehaviors>
</behaviors>
<services>
<service behaviorConfiguration="Behavior" name="MyService">
<endpoint address="" binding="webHttpBinding" behaviorConfiguration="EndpointBehavior" contract="IMyService"/>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
</service>
</services>
</system.serviceModel>
The problem is, the first call to the service blocks the second one, so GetProgress never returns until after PerformBigOperation is finished, by which point it is, of course, useless. Any ideas!?!
-Domenic Denicola-
|
|
|
|
|
Hi This is my code.
I want to read values from the DB and Store the values in Different cells in gridview is it possible.Help me.....
string executesp = "exec C_Detail '" + Label1.Text.Trim() + "'";
SqlCommand cmd = new SqlCommand(executesp, connect);
connect.Open();
SqlDataReader dr = cmd.ExecuteReader();
while (dr.Read())
{
for (int i = 0; i < 10; i++)
{
string columnindex = dr["COLUMNINDEX"].ToString();
int columnIndex = Convert.ToInt32(columnindex);
string headertypetop = dr["HEADERTYPETOP"].ToString();
string day = dr["DAY"].ToString();
string month = dr["MONTH"].ToString();
string year = dr["YEAR"].ToString();
string rowid = dr["ROWID"].ToString();
for(int j = 0 ; j<= columnIndex ;j++)
{
GridView1.Rows[j].Cells[1].Text = columnindex;
}
}
}
connect.Close();
Bharani
|
|
|
|
|
Hi,
Yes I think it’s possible.
Just a quick tip...I feel you better get the data to a DataTable and bind it directly.
For example:
Fill the data to a datatable.
string sConnection = ConfigurationManager.ConnectionStrings["TestDBConnectionString"].ConnectionString;
SqlConnection Con = new SqlConnection(sConnection);
SqlCommand cmd = new SqlCommand();
cmd.Connection = Con;
cmd.CommandType = CommandType.StoredProcedure;
cmd.CommandText = "Employee_Select";
SqlDataAdapter adp = new SqlDataAdapter(cmd);
DataTable dtValues = new DataTable();
adp.Fill(dtValues);
Bind it to gridview.
GridView1.DataSource = dtValues;
GridView1.DataBind();
In the .aspx page
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="false">
<Columns>
<asp:BoundField DataField="EmployeeNumber" HeaderText="Emp. No:" />
<asp:BoundField DataField="Name" HeaderText="Name" />
</Columns>
</asp:GridView>
Hope it solves.
Thx,
Gayani
|
|
|
|
|
Yes i got the answer Thans for ur reply
Bharani
|
|
|
|
|
Hi
I have a common methods class in my app_folder
In there I am trying to delcare a session but I get the following error message:
The name 'Session' does not exist in the current context
why would this be? can you not declare them in a class in app_folder?
thanks in advance
|
|
|
|
|
.netman wrote: The name 'Session' does not exist in the current context
You can access it by using
HttpContext.Current.Session .
Regard
Khan
please don't forget to vote on the post that helped you.
|
|
|
|