|
Dear Gentlemen,
I want to connect to GDS(Global Distribution System) for hotel booking in my website.. how can i go for it.. could you pls let me know about it. I tried in google but unfortunately i couldnt get proper resources.
please provide some links about this
Ahamed Azeem
Technical Lead
|
|
|
|
|
Find following link useful for the same.
GDS Integration[^]
HTH
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
I have a gridview control in aspx page. Suppose I have 3 columns, I need to have different colors for each column. I want to set different colors for three different columns in the gridview. Is it possible to set the colors in aspx page.
I have tried implementing, but could find any solution.
Please suggest me a way to achieve this...
CodingRocks
ASP.NET,C#.NET Programmer
BANGALORE
"Winners don't do different things. They do things differently. ...
|
|
|
|
|
Set ItemStyle-BackColor property of BoundField
<asp:BoundField ItemStyle-BackColor="Yellow" ....
|
|
|
|
|
You can also change color of particular row or column at
run time based on some condition.
i.e.
if(SomeCondition)
{
datagridview1.Columns[0].DefaultCellStyle.BackColor = Color.Aqua
datagridview1.rows[3].DefaultCellStyle.BackColor = Color.Aqua
}
else
{
datagridview1.Columns[0].DefaultCellStyle.BackColor = Color.Blue
datagridview1.rows[3].DefaultCellStyle.BackColor = Color.Blue
}
HTH
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
I have an ASMX webservice hosted alongside my ASP.NET web app. It is in the same project, hosted as the same IIS web application, and compiles to the same DLL. Now, I need to get the users session into the Webservice. To test this I made this simple method:
[WebMethod(EnableSession = true)]
public string checkSession()
{
return HttpContext.Current.Session["userid"].ToString();
}
So, first I login to my web app, then in the browser goto my webservice and click "checkSession" on that auto generated test page. I have tested this on 3 computers. All 3 of those work fine with the webapp(so the sessions are being created etc), and 2 of those return the value of Session["userid"] on invoking the webmethod, however the last computer returns "Object reference not set to an instance of an object" because Session is null.
So, whats the difference between these computers and why can my ASP.NET app get the sessions on all computers but the webservice cant?
I have also tested with my cellphone and it works there too.
Thanks
Strive to be humble enough to take advice, and confident enough to do something about it.
|
|
|
|
|
Well, See this msdn[^] article about sharing your session state between asp.net and web services.
|
|
|
|
|
I have looked through that article, and have done everything up to the point about cookie containers.
My webservice proxy has no such object, what am I missing?
EDIT:
Ok so I found that theres and attribute in the config file to enable the cookie container. But now my silverlight(which is what I am using to connect to the webservice) now gives this error:
"CookieContainer is not supported when using a browser-based HTTP stack. Cookies will be automatically managed by the browser. To gain manual control over cookies, switch to a different HTTP stack, for example by using WebRequest.RegisterPrefix with WebRequestCreator.ClientHttp."
But I don't think this has to do with Silverlight at all, or the cookiecontainer, because even that auto generated test page for the ASMX doesn't work.
Strive to be humble enough to take advice, and confident enough to do something about it.
modified on Wednesday, July 21, 2010 4:45 PM
|
|
|
|
|
Hi,
I am having problem in displaying report in doc file. the code is
SqlConnection cnx = new SqlConnection(categories.strCnx);
cnx.Open();
string query = @"select * from categories";
SqlCommand cmd = cnx.CreateCommand();
cmd.CommandText = query;
SqlDataReader dr;
HttpContext.Current.Response.Clear(); //clear anything in io buffer
HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment;filename=categories.doc");
HttpContext.Current.Response.Charset = "";
HttpContext.Current.Response.ContentType = "application/vnd.ms-document";
HttpContext.Current.Response.Write("categories" + '\n');
try
{
i = 0;
dr = cmd.ExecuteReader();
while (dr.Read())
{
s[i]= dr[0].tostring();
i++;
}
for (int j = 0; j
{
HttpContext.Current.Response.Write(s[j].ToString() + '\n');
}
HttpContext.Current.Response.End();
}
catch(Exception ex)
{
string pt = ex.ToString();
}
In this code, if I write the file inside the while(dr.read()), it works fine but when i tried to write it inside the for loop, it doesn't give the output.
Why is that and how to solve it ?? Any idea ??
sm
|
|
|
|
|
SayamiSuchi wrote: it doesn't give the output.
What does that mean? Did you debug it? What did you see/get? Give us your error message so we can understand it better.
|
|
|
|
|
yes i did debug.
it said
System.Threading.ThreadAbortException: Thread was being aborted.
at System.Threading.Thread.AbortInternal()
at System.Threading.Thread.Abort(Object stateInfo)
at System.Web.HttpResponse.End()
at categories.Default_View.filetesting() in C:\Documents and Settings\smanandhar\My Documents\Visual Studio 2008\Projects\categories\Default_View.ascx.cs:line 1209
suchita
modified on Thursday, July 22, 2010 10:29 AM
|
|
|
|
|
I have one asp.net page (Page1) with llots of controls.
After submitting this page, I have another page (Page2) on which there is one link which redirects me again to the same page from which I came from but with prefilled values. On the original page (Page1), there is one link "Clear Fields". Onclick of this link I want to clear all the controls.
document.forms[0].reset() --- Not working in this case.
Before submitting the form, if I fill up the values and click on "Clear Fields" link, I am able to reset all the controls but once I submit the form and came back to the same page, the above javascript code is not working.
Can anyone help me!!
|
|
|
|
|
Well, you would need to set all the control values to their default values. Look Here[^]
|
|
|
|
|
First of all it seems an extremely poor design to one a page that simply redirects back to the page you came from, and is most likely causing you more difficulties. Using viewstate, or some other form of persistence, the controls can retain there values between postbacks. You should also be using a cross-browser JavaScript library such as JQuery.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Here is my problem...
On first page, i have some fields for user input. Based on user input on first page, will display the results on second page.
On second page, i have modify button, which takes me to first page. So clicking on reset button on first page doesn't clear off all the fields if i coming from second page.
Before submitting the first page, the values are resetting.
|
|
|
|
|
This functionality can, and should, be accomplished on the same page. Enabling or disabling the controls to put them in edit mode or non-edit mode is the typical implementation and what would be expected by users.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Hi Guys ,
In my ASP.net application i am using an crystal report viewer by which i will show the Crystal Report in the page.
with the help of the report document i will do the data base log on via
dsn name, database name, user name and all..
here my DSN is not valid,
even though the reportdocument.setdatabaseLogon() is doing fine with out any error, but at the last it is showing me the login page.
i want to check and if the DSN is invalid i need to show and exception,
we can check the DSN from registry but in my requirement that wont solve my problem.
Any suggestions.?
|
|
|
|
|
Attempt to connect to the database using ADO.NET before allowing the page to load, ie
System.Data.OleDb conncetion = new System.Data.OleDb(connectionString);
connection.Open();
|
|
|
|
|
How could I connect to ms-sqlserver by using ASP Language?
|
|
|
|
|
First of all, this is a very fundamental question. If you don't know this, you are not ready for programming.
To start, read some books/articles on the internet. Then try out a few samples. Better, try developing a simple application.
Issues will keep coming. Learn this[^]!
..Go Green..
|
|
|
|
|
|
|
DECLARE @spot SMALLINT
DECLARE @str VARCHAR(8000)
DECLARE @strQuery nVARCHAR(1000)
DECLARE @sql VARCHAR(8000)
DECLARE @cslist VARCHAR(8000)
declare @Count int
set @Count=0
set @cslist='CallLog1230,CallLog2230'
MainLoop:
WHILE @cslist <> ''
BEGIN
SET @spot = CHARINDEX(',', @cslist)
print @spot
IF @spot>0
BEGIN
SET @str = CAST(LEFT(@cslist, @spot-1) AS varchar)
SET @cslist = RIGHT(@cslist, LEN(@cslist)-@spot)
print @cslist
goto InComing
goto OutGoing
END
ELSE
BEGIN
SET @str = CAST(@cslist AS varchar)
SET @cslist = ''
print @str
if(@Count=0)
Begin
set @Count=1
goto InComing
goto OutGoing
End
Else
goto EndLoop
END
End
InComing:
Begin
print 'IN'
print @str
End
OutGoing:
Begin
print 'OUT'
print @str
goto MainLoop
End
EndLoop:
return
I am not return from the While loop Please help me to find where i am wrong
|
|
|
|
|
Remove "goto MainLoop" from bottom of "OutGoing:"
Hardik Panchal
|
|
|
|
|
In my asp .net web application project,I used two ajax calendar extenders for fromdate and todate and two text boxes to display the date.I have four radiobuttons.Before,After,between,equals.I have to disable the calendar extendar in page load and when the between radio button is checked,then only that two date calendarextendar will have to be enabled.
please help me to write java script to disable calendar extender
Thank you
|
|
|
|