|
Yes Thank you - i posted here as i had realised the mistake i made regarding the category i put the post in.
Also i am very new could you please elaborate.
Thank you
|
|
|
|
|
I want to use asynchronous socket on my asp.net page 2.0. Here is the problem: When the user click on a button, I need to launch a socket to connect to another machine on another network to process data (this could take 2-3 minutes). I build my own asynchronous socket class and it work fine on desktop application, but how do I use it in asp.net page. Since the processing of data can take as least 2 minutes, I do not want to freeze the user. I search everywhere but found no solution. Any help will be appreciated.
Rookie Programmer
|
|
|
|
|
|
is there a way of using asp:Sqldatasource tag and its commands with parametres, not in aspx file but in aspx.cs file. i want to write insert, update and delete commands in a class file, how can i do it?
|
|
|
|
|
Well you could try this example for the select method I am sure it works but I didn't try it for insert, update and delete commands, but I guess it will be the same idea.
objDataSource.SelectMethod = "MethodName";
objDataSource.SelectParameters["ParameterName"] = new Parameter("ParameterName", ParameterType, ParameterValue);
objDataSource.Select();
Mohamed El Gohary
|
|
|
|
|
I tried to design a master page with real content via css and it was rendered as normal html with only a few of the elements like text inheriting from the css class. I would like to know if any one has been successful in doing a "themey" masterpage via css.
Now i'm not talking about regular styling but this^ kind of styling
A little example would be greatly appreciated.
Live in fragments no longer. Only connect.
-- modified at 8:04 Thursday 20th July, 2006
|
|
|
|
|
Yes it is possible. Use the StyleSheetTheme property in teh master page or set it in the web.config file.
|
|
|
|
|
when you go to this page
http://www1.sprintpcs.com/explore/coverage/CoverageOverview.jsp?ATR_ExtraOne=Personal_Wireless_Plans_Coverage
and enter a zipcode and when u click the 'View coverage' image button, then you get the next page which shows whether you have coverage to the zipcode you entered. But i'm having problem when i do it through Csharp.Net. The problem is the zipcode value is not getting submitted through the image button.
this is the final page where it displays whether it has coverage or not.
http://www1.sprintpcs.com/explore/coverage/CoverageOverview.jsp?bmForm=SprintZipCodeToCSAComponentPlansFocus&bmFormID=1152889587027&bmUID=1152889587027&bmIsForm=true&bmPrevTemplate=explore%2Fcoverage%2FCoverageOverview.jsp&bmText=csaZip&csaZip=20171&bmImage=ShowPlans.x&bmImage=ShowPlans.y&bmImage=ReturnCSA.x&bmImage=ReturnCSA.y&bmHidden=FOLDER%3C%3Efolder_id&FOLDER%3C%3Efolder_id=1436777&bmHidden=CURRENT_USER%3C%3EATR_SCID&CURRENT_USER%3C%3EATR_SCID=ECOMM&bmHidden=CURRENT_USER%3C%3EATR_PCode&CURRENT_USER%3C%3EATR_PCode=None&bmHidden=CURRENT_USER%3C%3EATR_cartState&CURRENT_USER%3C%3EATR_cartState=group&bmFields=bmForm%2CbmFormID%2CbmUID%2CbmIsForm%2CbmPrevTemplate%2CbmText%2CbmImage%2CbmHidden&bmHash=84312c83205bfccaa4a01a0f0edbd2d4495bbd27&ReturnCSA.x=36&ReturnCSA.y=7
any help would be appreciated
|
|
|
|
|
How are you submitting it? Are you handling the click event redirecting to the page?
|
|
|
|
|
In the Page_Load i'm calling the PostFormData() by passing URL as a parameter. Code here is
lblTest.Text = PostFormData("","http://www1.sprintpcs.com/explore/coverage/CoverageOverview.jsp?bmForm=SprintZipCodeToCSAComponentPlansFocus&bmFormID=1152824111731&bmUID=1152824111731&bmIsForm=true&bmPrevTemplate=explore%2Fcoverage%2FCoverageOverview.jsp&bmText=csaZip&csaZip=20171&bmImage=ShowPlans.x&bmImage=ShowPlans.y&bmImage=ReturnCSA.x&bmImage=ReturnCSA.y&bmHidden=FOLDER%3C%3Efolder_id&FOLDER%3C%3Efolder_id=1436777&bmHidden=CURRENT_USER%3C%3EATR_SCID&CURRENT_USER%3C%3EATR_SCID=ECOMM&bmHidden=CURRENT_USER%3C%3EATR_PCode&CURRENT_USER%3C%3EATR_PCode=None&bmHidden=CURRENT_USER%3C%3EATR_cartState&CURRENT_USER%3C%3EATR_cartState=group&bmFields=bmForm%2CbmFormID%2CbmUID%2CbmIsForm%2CbmPrevTemplate%2CbmText%2CbmImage%2CbmHidden&bmHash=0b24f83f9aeb3e1e8e99ca2ae0d7a53e4b5637ed&ReturnCSA.x=33&ReturnCSA.y=9");
and code for PostFormData is here
private string PostFormData(string strFormData,string strPostURL)
{
try
{
bytData = Encoding.ASCII.GetBytes(strFormData);
myWebReq = (HttpWebRequest)WebRequest.Create
(strPostURL);
myWebReq.Method = "POST";
myWebReq.KeepAlive = false;
myWebReq.ContentType = "application/x-www-form-
urlencoded";
myWebReq.ContentLength = bytData.Length;
reqStream = myWebReq.GetRequestStream();
reqStream.Write(bytData, 0, bytData.Length);
reqStream.Close();
HttpWebResponse myWebRspns = (HttpWebResponse)
myWebReq.GetResponse();
srResult = new StreamReader(myWebRspns.GetResponseStream
(), System.Text.Encoding.ASCII);
strResponse = srResult.ReadToEnd();
srResult.Close();
return strResponse;
}
I don't know where i'm going wrong. Pls help
|
|
|
|
|
I am storing date in a textbox as well as pre popualte.
But it sometimes give InvalidCastException while converting to my required format when I port it into production server(Server has different Date Time format)
So I fixed the culture to some fixed culture which uses dd/mm/yyyy format(du-AT)
Now all fine it does not give any exception in either of the place, but I still wonder is that the right way!!!
|
|
|
|
|
You can specify the culture in the call when you parse the date. You can also use ParseExact to parse a specific format.
---
b { font-weight: normal; }
|
|
|
|
|
You could also use a date chooser control instead of a regular text box.
One option is: Excentrics World[^]
But there are many others.
daniero
|
|
|
|
|
I am placing the table into the edititemtemplate of DataGrid Control.I want to find the table in the codebehind file programically.
i am placing in edititemtemplate as
<edititemtemplate>
<table id = "dynamic">
</table>
</edititemtemplate>
I am finding the table in the ItemDataBound function in this manner
dim c as control=e.item.findcontrol("dynamic")
But c comes out to be nothing
Please help
|
|
|
|
|
i think you need to make your table attribute runat=server in order to get it in code file
Nav.
|
|
|
|
|
It is still not working. Thanks
|
|
|
|
|
It will work Boss.
Make sure your aspx page is in the format
<Columns>
<asp:TemplateColumn HeaderText="Edit">
<ItemTemplate>
<table runat="server" id="tbl">
<tr>
<td>ok</td>
</tr>
</table>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
---------------------------------------
and you have properly binding data to Datagrid
DataTable dt=new DataTable();
dt.Columns.Add(new DataColumn("One"));
DataRow drow=dt.NewRow();
drow[0]="okman";
dt.Rows.Add(drow);
DataGrid1.DataSource =dt;
DataGrid1.DataBind();
-------------In item databound event write below
if(e.Item.FindControl("tbl")!=null)
{
Response.Write("Found");
}
It will write "Found"
|
|
|
|
|
I believe that you'll need to add the attribute runat = "server" to your table:
...<br />
<br />
<edititemtemplate><br />
<table id = "dynamic" runat = "server"><br />
<br />
...
That should allow you to use FindControl to retrieve it. Hope that helps.
--Jesse
|
|
|
|
|
It is still not working Thanks
|
|
|
|
|
Man try this thing
dim c as control=e.item(index).findcontrol("dynamic")
You should mention the index of the datagrid row.
Do good and have good.
|
|
|
|
|
it is producing error sorry
|
|
|
|
|
What is the maximum duration of Cookie
thanx in advance
|
|
|
|
|
What's the max amount of time in seconds/minutes/hours you can have? Xactly, infinite. Technically, the client would eventually do a system shutdown or reboot, so you can even set the cookie to last for 10hrs -> nidheeCookie.Expires.Add.Minutes(600);
Figure it out buddy!
Live in fragments no longer. Only connect.
|
|
|
|
|
Yep, infinite:
here is one year:
Dim aCookie As New HttpCookie("myCookie")
aCookie.Expires = DateTime.Now.AddDays(365)
You can always keep extending the time by setting the cookie again each time they hit your site.
"Half this game is ninety percent mental." - Yogi Berra
If you can read thank a teacher, if you can read in English, thank a Marine.
M y and h don't work so well due to m addiction to caffeine and m in abilit to to set a cup down uprigt.
|
|
|
|
|
Hi,
Can anybody help me in suggesting, how can i play only a part of the song using a Window Media Player object on the web page(say from start of the song to 20 seconds of the song).
Thanks,
Sai.
|
|
|
|